diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-07 14:17:02 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-06 17:07:59 +0000 |
commit | cf27d9e8a5e14ebe083f4b0fa2204d0646e7ed5e (patch) | |
tree | 56ab889591e8cdb919f9b5b3ac6a46af6126a2da /examples/widgets/richtext/calendar/mainwindow.cpp | |
parent | 283008e123e5eacb83869682528b2024186634f8 (diff) |
Cleanup Widgets examples - new signal/slot syntax
Cleanup the Widget examples - use the new signal/slot syntax where
possible - painting and richtext subdirectory
Change-Id: If0e365ab1cabf9184076595494cfca151406fddf
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/richtext/calendar/mainwindow.cpp')
-rw-r--r-- | examples/widgets/richtext/calendar/mainwindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/widgets/richtext/calendar/mainwindow.cpp b/examples/widgets/richtext/calendar/mainwindow.cpp index 38dc0e2849..3ddb1cf7ad 100644 --- a/examples/widgets/richtext/calendar/mainwindow.cpp +++ b/examples/widgets/richtext/calendar/mainwindow.cpp @@ -86,10 +86,12 @@ MainWindow::MainWindow() //! [2] //! [3] - connect(monthCombo, SIGNAL(activated(int)), this, SLOT(setMonth(int))); - connect(yearEdit, SIGNAL(dateChanged(QDate)), this, SLOT(setYear(QDate))); - connect(fontSizeSpinBox, SIGNAL(valueChanged(int)), - this, SLOT(setFontSize(int))); + connect(monthCombo, QOverload<int>::of(&QComboBox::activated), + this, &MainWindow::setMonth); + connect(yearEdit, &QDateTimeEdit::dateChanged, + this, &MainWindow::setYear); + connect(fontSizeSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), + this, &MainWindow::setFontSize); //! [3] fontSizeSpinBox->setValue(10); |