本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}