- QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
- layout->addWidget( closeButton, 1, 4, 1, 1 );
- CONNECT( closeButton, clicked(), this, close() );
+ QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
+ closeButtonBox->addButton(
+ new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
+ layout->addWidget( closeButtonBox );
+ CONNECT( closeButtonBox, rejected(), this, close() );