- connect( buttonCancel, SIGNAL( pressed() ), this, SIGNAL( cancel() ) );
- connect( iProgress, SIGNAL( valueChanged( int ) ), this, SIGNAL( started() ) );
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ iLabel = new QLabel();
+ mainLayout->addWidget( iLabel );
+ QHBoxLayout *subLayout = new QHBoxLayout;
+ subLayout->addWidget( iProgress );
+ if( aCancellable ) {
+ QPushButton *buttonCancel = new QPushButton( tr( "Cancel" ) );
+ subLayout->addSpacing( 5 );
+ subLayout->addWidget( buttonCancel );
+ connect( buttonCancel, SIGNAL( pressed() ), this, SIGNAL( cancel() ) );
+ }