本文整理汇总了C++中QLayout::setAutoAdd方法的典型用法代码示例。如果您正苦于以下问题:C++ QLayout::setAutoAdd方法的具体用法?C++ QLayout::setAutoAdd怎么用?C++ QLayout::setAutoAdd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLayout
的用法示例。
在下文中一共展示了QLayout::setAutoAdd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLabel
/*!
Builds an epsilon qm parameter area within the quality measure dialog
box. This includes building a QT combo box for the GWS selection and
one for the TWS selection. However, currently there is only one possible
TWS. In the future, there may be ways to define others.
*/
void
QualEpsilon::buildParamArea(qmDlgDataT *qmData)
{
int i;
static QualEpsilonParamT params;
QualEpsilon *currQM = (QualEpsilon *)qmData->currQM;
#ifdef GRASPITDBG
std::cout << "building qualepsilon" << std::endl;
#endif
QLayout *l = new QGridLayout(qmData->settingsArea, 2, 2, 1);
l->setAutoAdd(true);
// create the GWS type menu
new QLabel(QString("Limit unit GWS using:"), qmData->settingsArea);
params.gwsTypeComboBox = new QComboBox(qmData->settingsArea, "gwsComboBox");
new QLabel(QString("Task Wrench Space (TWS):"), qmData->settingsArea);
params.twsTypeComboBox = new QComboBox(qmData->settingsArea, "twsComboBox");
// count the number of possible gws types
for (i = 0; GWS::TYPE_LIST[i]; i++) {
params.gwsTypeComboBox->insertItem(QString(GWS::TYPE_LIST[i]));
if (currQM && !strcmp(currQM->gws->getType(), GWS::TYPE_LIST[i])) {
params.gwsTypeComboBox->setCurrentItem(i);
}
}
params.twsTypeComboBox->insertItem(QString("Unit Ball"));
qmData->paramPtr = ¶ms;
}