当前位置: 首页>>代码示例>>C++>>正文


C++ KLineEdit::resize方法代码示例

本文整理汇总了C++中KLineEdit::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ KLineEdit::resize方法的具体用法?C++ KLineEdit::resize怎么用?C++ KLineEdit::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KLineEdit的用法示例。


在下文中一共展示了KLineEdit::resize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QGridLayout

void *FormBase::setupGridLineEdit(QWidget *parent, QStringList texts, int lineEditWidth)
{
	QGridLayout *layout = new QGridLayout(parent, texts.count(), 2, 5, 5);
	
	for (uint i = 0; i < texts.count(); i++)
	{
		QLabel *labTmp = new QLabel(texts[i], parent);
		KLineEdit *lineEditTmp = new KLineEdit(parent);
		lineEditTmp->setMaximumWidth(lineEditWidth);
		lineEditTmp->resize( lineEditTmp->height(), lineEditWidth);
		labTmp->setBuddy(lineEditTmp);
		layout->addWidget(labTmp, i, 0);
		layout->addWidget(lineEditTmp, i, 1);
	}
}
开发者ID:BackupTheBerlios,项目名称:kludoteca-svn,代码行数:15,代码来源:formbase.cpp

示例2: addLineEdits

void FormBase::addLineEdits(QWidget *parent, QStringList texts, HashLineEdit &hle, int lineEditWidth, QStringList names)
{
	QGridLayout *layout = static_cast<QGridLayout *>(parent->layout());
	
	for (uint i = 0; i < texts.count(); i++)
	{
		QLabel *labTmp = new QLabel(texts[i], parent);
		KLineEdit *lineEditTmp = new KLineEdit(parent, names[i]);
		lineEditTmp->setMaximumWidth(lineEditWidth);
		lineEditTmp->resize( lineEditTmp->height(), lineEditWidth);
		labTmp->setBuddy(lineEditTmp);

		int row = i + layout->numRows();
		layout->addWidget(labTmp, row, 0);
		layout->addWidget(lineEditTmp, row, 1);
		
		hle.insert(names[i], lineEditTmp);
	}
}
开发者ID:BackupTheBerlios,项目名称:kludoteca-svn,代码行数:19,代码来源:formbase.cpp

示例3: setupGridLineEdit

HashLineEdit FormBase::setupGridLineEdit(QWidget *parent, QStringList texts, int lineEditWidth, QStringList names)
{
	Q_ASSERT(names.count() == texts.count());
	
	HashLineEdit lineEdits;
	QGridLayout *layout = new QGridLayout(parent, texts.count(), 2, 5, 5);
	
	for (uint i = 0; i < texts.count(); i++)
	{
		QLabel *labTmp = new QLabel(texts[i], parent);
		KLineEdit *lineEditTmp = new KLineEdit(parent, names[i]);
		lineEditTmp->setMaximumWidth(lineEditWidth);
		lineEditTmp->resize( lineEditTmp->height(), lineEditWidth);
		labTmp->setBuddy(lineEditTmp);
		layout->addWidget(labTmp, i, 0);
		layout->addWidget(lineEditTmp, i, 1);
		
		lineEdits.insert(names[i], lineEditTmp);
	}
	
	return lineEdits;
}
开发者ID:BackupTheBerlios,项目名称:kludoteca-svn,代码行数:22,代码来源:formbase.cpp


注:本文中的KLineEdit::resize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。