From c667195e19ec9898b21cc5ebfa29dc8804ec96ad Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 12 Jan 2016 21:20:24 +0100 Subject: [PATCH] Hook up the OK button in the about dialog. --- aboutdialog.cpp | 2 ++ ui_aboutdialog.ui | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aboutdialog.cpp b/aboutdialog.cpp index 788aa97..6b74aec 100644 --- a/aboutdialog.cpp +++ b/aboutdialog.cpp @@ -8,5 +8,7 @@ AboutDialog::AboutDialog() : ui(new Ui::AboutDialog) { ui->setupUi(this); + + connect(ui->button_box, &QDialogButtonBox::accepted, [this]{ this->close(); }); } diff --git a/ui_aboutdialog.ui b/ui_aboutdialog.ui index 5386328..8709322 100644 --- a/ui_aboutdialog.ui +++ b/ui_aboutdialog.ui @@ -78,7 +78,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> - + Qt::Horizontal @@ -92,7 +92,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> - buttonBox + button_box accepted() Dialog accept() @@ -108,7 +108,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> - buttonBox + button_box rejected() Dialog reject() -- 2.39.2