本文整理汇总了C++中Q3GroupBox::setTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3GroupBox::setTitle方法的具体用法?C++ Q3GroupBox::setTitle怎么用?C++ Q3GroupBox::setTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3GroupBox
的用法示例。
在下文中一共展示了Q3GroupBox::setTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
CTracing::CTracing( QWidget* parent, const char* name )
: QWidget( parent, name, 0 )
{
QBoxLayout *playoutTop = new QVBoxLayout( this, 5 );
// Tracing
#ifdef QT_V4LAYOUT
Q3GroupBox *pgroupbox = new Q3GroupBox( this );
#else
QGroupBox *pgroupbox = new QGroupBox( this );
#endif
pgroupbox->setFrameStyle( QFrame::Box | QFrame::Raised );
pgroupbox->setTitle( QString("Tracing") );
playoutTop->addWidget( pgroupbox, 5 );
QGridLayout *playoutGrid = new QGridLayout( pgroupbox, 3, 2, 5 );
QLabel *plabel1 = new QLabel( "Enabled", pgroupbox, "plabel1" );
pTracing = new QCheckBox( pgroupbox, "pTracing" );
QLabel *plabel3 = new QLabel( "Force Tracing", pgroupbox, "plabel1" );
pForce = new QCheckBox( pgroupbox, "pForce" );
QLabel *plabel2 = new QLabel( "File", pgroupbox, "plabel2" );
pTraceFile = new CFileSelector( pgroupbox, "pTraceFile" );
playoutGrid->addWidget( plabel1, 1, 0 );
playoutGrid->addWidget( pTracing, 1, 1 );
playoutGrid->addWidget( plabel3, 1, 2 );
playoutGrid->addWidget( pForce, 1, 3 );
playoutGrid->addWidget( plabel2, 2, 0 );
playoutGrid->addWidget( pTraceFile, 2, 1 );
// Connection Pooling
#ifdef QT_V4LAYOUT
pgroupbox = new Q3GroupBox( this );
#else
pgroupbox = new QGroupBox( this );
#endif
pgroupbox->setFrameStyle( QFrame::Box | QFrame::Raised );
pgroupbox->setTitle( QString("Connection Pooling") );
playoutTop->addWidget( pgroupbox, 5 );
playoutGrid = new QGridLayout( pgroupbox, 3, 3, 5 );
playoutGrid->setColStretch( 2, 10 );
plabel1 = new QLabel( "Enabled", pgroupbox, "plabel1" );
pPooling = new QCheckBox( pgroupbox, "pPooling" );
playoutGrid->addWidget( plabel1, 1, 0 );
playoutGrid->addWidget( pPooling, 1, 1 );
// Buttons
playoutGrid = new QGridLayout( playoutTop, 1, 5, 2 );
QPushButton *pSetDefault = new QPushButton( "De&fault", this );
QPushButton *pApply = new QPushButton( "A&pply", this );
playoutGrid->addWidget( pSetDefault, 1, 1 );
playoutGrid->addWidget( pApply, 1, 3 );
// helpt text
QFrame *pframe;
pframe = new QFrame( this, "Frame_7" );
pframe->setFrameStyle( QFrame::Box | QFrame::Raised );
playoutTop->addWidget( pframe, 4 );
playoutGrid = new QGridLayout( pframe, 1, 2, 5 );
plabel1 = new QLabel( pframe, "Label_1" );
plabel1->setGeometry( 20, 20, 32, 32 );
plabel1->setPixmap( xpmAdvanced );
plabel1->setMinimumSize( 32, 32 );
// plabel1->setMaximumSize( 32, 32 );
plabel2 = new QLabel( pframe, "Label_2" );
plabel2->setText( "These options are global. As such, they can only be set by the system administrator or someone else with 'root' access. Turn Tracing on to enable logging of calls. Turn Pooling on to enable Driver Pooling options." );
#ifdef QT_V4LAYOUT
plabel2->setAlignment( Qt::AlignLeft | Qt::WordBreak );
plabel2->setWordWrap( true );
#else
plabel2->setAlignment( AlignLeft | WordBreak );
#endif
playoutGrid->addWidget( plabel1, 0, 0 );
playoutGrid->addWidget( plabel2, 0, 1 );
playoutGrid->setColStretch( 1, 10 );
// init values
char szTracing[10];
char szForce[10];
char szTracingFile[FILENAME_MAX];
char szPooling[10];
char szGUIPlugin[FILENAME_MAX];
SQLGetPrivateProfileString( "ODBC", "Trace", "No", szTracing, sizeof(szTracing), "odbcinst.ini" );
if ( szTracing[0] == '1' || toupper( szTracing[0] ) == 'Y'
|| ( toupper( szTracing[0] ) == 'O' && toupper( szForce[0] ) == 'N' ))
pTracing->setChecked( true );
SQLGetPrivateProfileString( "ODBC", "ForceTrace", "No", szForce, sizeof(szForce), "odbcinst.ini" );
//.........这里部分代码省略.........
示例2: 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();
}