From: Steinar H. Gunderson Date: Tue, 12 Jan 2016 20:20:24 +0000 (+0100) Subject: Hook up the OK button in the about dialog. X-Git-Tag: 1.0.0~16 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c667195e19ec9898b21cc5ebfa29dc8804ec96ad;p=nageru Hook up the OK button in the about dialog. --- 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()