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


C++ Q3GroupBox::setFrameStyle方法代码示例

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


在下文中一共展示了Q3GroupBox::setFrameStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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" );
//.........这里部分代码省略.........
开发者ID:ystk,项目名称:debian-unixodbc,代码行数:101,代码来源:CTracing.cpp


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