From ac9899b4cbae6af6f075be91c2863b17605a1085 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 23 Jun 2016 12:15:06 +0200 Subject: mainwindow example: fix creating custom QDockWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The signal was connected to the wrong slot. Regressed in 2fe56e37ede40dc703a9c3c8eb240b80c9c00757. Change-Id: I33135fc79c3585dfbe0f6ebc04f819e919ed9ed7 Reviewed-by: Sérgio Martins --- examples/widgets/mainwindows/mainwindow/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp index 91579ae611..b0fa72276d 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp @@ -412,7 +412,7 @@ CreateDockWidgetDialog::CreateDockWidgetDialog(QWidget *parent) QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::reject); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); layout->addWidget(buttonBox, 2, 0, 1, 2); } -- cgit v1.2.3