From 96fa1d33c7b251bf54c239071e4cf5535c5d538b Mon Sep 17 00:00:00 2001 From: scorpio810 Date: Sun, 12 Jun 2016 22:42:24 +0000 Subject: [PATCH] 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 --- sources/aboutqet.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sources/aboutqet.cpp b/sources/aboutqet.cpp index ba81a58d3..3ddfab905 100644 --- a/sources/aboutqet.cpp +++ b/sources/aboutqet.cpp @@ -45,10 +45,7 @@ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) { tabs -> addTab(titleTab(), tr("&Version", "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 QVBoxLayout *vlayout = new QVBoxLayout(); @@ -60,6 +57,17 @@ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) { scrollArea->setFixedSize (690, 610); 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); + + }