AboutQET Widget : add button to close the dialog box

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4553 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2016-06-12 22:42:24 +00:00
parent 29727dfea3
commit 96fa1d33c7

View File

@@ -45,10 +45,7 @@ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
tabs -> addTab(titleTab(), tr("&Version", "tab title")); tabs -> addTab(titleTab(), tr("&Version", "tab title"));
tabs -> addTab(licenseTab(), tr("&Accord de licence", "tab title")); tabs -> addTab(licenseTab(), tr("&Accord de licence", "tab title"));
// A button to close the dialog box
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));
// All in a vertical arrangement // All in a vertical arrangement
QVBoxLayout *vlayout = new QVBoxLayout(); QVBoxLayout *vlayout = new QVBoxLayout();
@@ -60,6 +57,17 @@ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) {
scrollArea->setFixedSize (690, 610); scrollArea->setFixedSize (690, 610);
scrollArea->setWidget(tabs); scrollArea->setWidget(tabs);
// A button to close the dialog box
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(accept()));
QHBoxLayout *hlayout = new QHBoxLayout();
vlayout -> addStretch();
vlayout -> addWidget(buttons);
setLayout(hlayout);
} }