diff options
Diffstat (limited to 'examples/widgets/widgets/windowflags/controllerwindow.cpp')
-rw-r--r-- | examples/widgets/widgets/windowflags/controllerwindow.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/widgets/widgets/windowflags/controllerwindow.cpp b/examples/widgets/widgets/windowflags/controllerwindow.cpp index c19f23c513..e2abad89f4 100644 --- a/examples/widgets/widgets/windowflags/controllerwindow.cpp +++ b/examples/widgets/widgets/windowflags/controllerwindow.cpp @@ -62,7 +62,8 @@ ControllerWindow::ControllerWindow(QWidget *parent) createHintsGroupBox(); quitButton = new QPushButton(tr("&Quit")); - connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); + connect(quitButton, &QPushButton::clicked, + qApp, &QApplication::quit); QHBoxLayout *bottomLayout = new QHBoxLayout; bottomLayout->addStretch(); @@ -220,7 +221,8 @@ void ControllerWindow::createHintsGroupBox() QCheckBox *ControllerWindow::createCheckBox(const QString &text) { QCheckBox *checkBox = new QCheckBox(text); - connect(checkBox, SIGNAL(clicked()), this, SLOT(updatePreview())); + connect(checkBox, &QCheckBox::clicked, + this, &ControllerWindow::updatePreview); return checkBox; } //! [7] @@ -229,7 +231,8 @@ QCheckBox *ControllerWindow::createCheckBox(const QString &text) QRadioButton *ControllerWindow::createRadioButton(const QString &text) { QRadioButton *button = new QRadioButton(text); - connect(button, SIGNAL(clicked()), this, SLOT(updatePreview())); + connect(button, &QRadioButton::clicked, + this, &ControllerWindow::updatePreview); return button; } //! [8] |