本文整理汇总了C++中Q3GroupBox::setColumns方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3GroupBox::setColumns方法的具体用法?C++ Q3GroupBox::setColumns怎么用?C++ Q3GroupBox::setColumns使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3GroupBox
的用法示例。
在下文中一共展示了Q3GroupBox::setColumns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLabel
QDataDescriptionWidget::QDataDescriptionWidget(QWidget* parent, core::objectmodel::Base* object):QWidget(parent)
{
QVBoxLayout* tabLayout = new QVBoxLayout( this, 0, 1, QString("tabInfoLayout"));
//Instance
{
Q3GroupBox *box = new Q3GroupBox(this, QString("Instance"));
box->setColumns(2);
box->setTitle(QString("Instance"));
new QLabel(QString("Name"), box);
new QLabel(QString(object->getName().c_str()), box);
new QLabel(QString("Class"), box);
new QLabel(QString(object->getClassName().c_str()), box);
std::string namespacename = core::objectmodel::BaseClass::decodeNamespaceName(typeid(*object));
if (!namespacename.empty())
{
new QLabel(QString("Namespace"), box);
(new QLabel(QString(namespacename.c_str()), box))->setMinimumWidth(20);
}
if (!object->getTemplateName().empty())
{
new QLabel(QString("Template"), box);
(new QLabel(QString(object->getTemplateName().c_str()), box))->setMinimumWidth(20);
}
tabLayout->addWidget( box );
}
//Class description
core::ObjectFactory::ClassEntry entry = core::ObjectFactory::getInstance()->getEntry(object->getClassName());
if (! entry.creatorMap.empty())
{
Q3GroupBox *box = new Q3GroupBox(this, QString("Class"));
box->setColumns(2);
box->setTitle(QString("Class"));
if (!entry.description.empty() && entry.description != std::string("TODO"))
{
new QLabel(QString("Description"), box);
(new QLabel(QString(entry.description.c_str()), box))->setMinimumWidth(20);
}
core::ObjectFactory::CreatorMap::iterator it = entry.creatorMap.find(object->getTemplateName());
if (it != entry.creatorMap.end() && *it->second->getTarget())
{
new QLabel(QString("Provided by"), box);
(new QLabel(QString(it->second->getTarget()), box))->setMinimumWidth(20);
}
if (!entry.authors.empty() && entry.authors != std::string("TODO"))
{
new QLabel(QString("Authors"), box);
(new QLabel(QString(entry.authors.c_str()), box))->setMinimumWidth(20);
}
if (!entry.license.empty() && entry.license != std::string("TODO"))
{
new QLabel(QString("License"), box);
(new QLabel(QString(entry.license.c_str()), box))->setMinimumWidth(20);
}
tabLayout->addWidget( box );
}
tabLayout->addStretch();
}