- QFrame* aFrame = new QFrame( this );
- setWidget( aFrame );
- QVBoxLayout* aLayout = new QVBoxLayout( aFrame );
-
- myMainFrame = new QFrame( this );
- QGridLayout* aMainLayout = new QGridLayout( myMainFrame );
- myBtnFrame = new QFrame( this );
- aLayout->addWidget( myMainFrame, 1 );
- aLayout->addWidget( myBtnFrame, 0 );
-
- QHBoxLayout* aBtnsLayout = new QHBoxLayout( myBtnFrame );
- aBtnsLayout->setMargin( 5 );
- aBtnsLayout->setSpacing( 5 );
-
- myApply = new QPushButton( tr( "APPLY" ), myBtnFrame ),
- myCancel = new QPushButton( tr( "CANCEL" ), myBtnFrame );
- myHelp = new QPushButton( tr( "HELP" ), myBtnFrame );
-
- aBtnsLayout->addWidget( myApply, 0 );
- aBtnsLayout->addWidget( myCancel, 0 );
- aBtnsLayout->addStretch( 1 );
- aBtnsLayout->addWidget( myHelp, 0 );
-
- connect( myApply, SIGNAL( clicked() ), this, SLOT( OnApply() ) );
- connect( myCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
- connect( myHelp, SIGNAL( clicked() ), this, SLOT( OnHelp() ) );
+ if ( doInitLayout ) {
+
+ QFrame* aFrame = new QFrame( this );
+ setWidget( aFrame );
+ QVBoxLayout* aLayout = new QVBoxLayout( aFrame );
+
+ myMainFrame = new QFrame( aFrame );
+ QBoxLayout* aMainLayout = new QVBoxLayout( myMainFrame );
+ aMainLayout->setMargin( 0 );
+ aMainLayout->setSpacing( 5 );
+
+ aLayout->addWidget( myMainFrame, 1 );
+
+ myBtnFrame = new QFrame( aFrame );
+ aLayout->addWidget( myBtnFrame, 0 );
+
+ QHBoxLayout* aBtnsLayout = new QHBoxLayout( myBtnFrame );
+ aBtnsLayout->setMargin( 5 );
+ aBtnsLayout->setSpacing( 5 );
+
+ myApply = new QPushButton( tr( "APPLY" ), myBtnFrame );
+ myCancel = new QPushButton( tr( "CANCEL" ), myBtnFrame );
+ myHelp = new QPushButton( tr( "HELP" ), myBtnFrame );
+
+ aBtnsLayout->addWidget( myApply, 0 );
+ aBtnsLayout->addWidget( myCancel, 0 );
+ aBtnsLayout->addStretch( 1 );
+ aBtnsLayout->addWidget( myHelp, 0 );
+
+ connect( myApply, SIGNAL( clicked() ), this, SLOT( onApply() ) );
+ connect( myCancel, SIGNAL( clicked() ), this, SLOT( onCancel() ) );
+ connect( myHelp, SIGNAL( clicked() ), this, SLOT( onHelp() ) );
+ }