diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-02 14:16:47 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-26 10:37:06 +0000 |
commit | bf4bf3a58360d4f7907895096b452cb3821ea593 (patch) | |
tree | 0a784f40986afb9c73aed2f5d13a2f554a09ce2e /examples/widgets/widgets/styles | |
parent | e81acde7d0cf5fb44a3fb2cf0bf7aaa2c65f807e (diff) |
Cleanup Widgets examples - signals/slots
Cleanup the widgets examples - use new signal/slot syntax where possible
Change-Id: I6bc8953534d8b1efca0de4ee6a9fe4a6aa79fda9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/widgets/styles')
-rw-r--r-- | examples/widgets/widgets/styles/widgetgallery.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/examples/widgets/widgets/styles/widgetgallery.cpp b/examples/widgets/widgets/styles/widgetgallery.cpp index d44547d905..dbe82c547b 100644 --- a/examples/widgets/widgets/styles/widgetgallery.cpp +++ b/examples/widgets/widgets/styles/widgetgallery.cpp @@ -79,19 +79,19 @@ WidgetGallery::WidgetGallery(QWidget *parent) //! [0] //! [1] - connect(styleComboBox, SIGNAL(activated(QString)), + connect(styleComboBox, QOverload<const QString &>::of(&QComboBox::activated), //! [1] //! [2] - this, SLOT(changeStyle(QString))); - connect(useStylePaletteCheckBox, SIGNAL(toggled(bool)), - this, SLOT(changePalette())); - connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), - topLeftGroupBox, SLOT(setDisabled(bool))); - connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), - topRightGroupBox, SLOT(setDisabled(bool))); - connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), - bottomLeftTabWidget, SLOT(setDisabled(bool))); - connect(disableWidgetsCheckBox, SIGNAL(toggled(bool)), - bottomRightGroupBox, SLOT(setDisabled(bool))); + this, &WidgetGallery::changeStyle); + connect(useStylePaletteCheckBox, &QCheckBox::toggled, + this, &WidgetGallery::changePalette); + connect(disableWidgetsCheckBox, &QCheckBox::toggled, + topLeftGroupBox, &QGroupBox::setDisabled); + connect(disableWidgetsCheckBox, &QCheckBox::toggled, + topRightGroupBox, &QGroupBox::setDisabled); + connect(disableWidgetsCheckBox, &QCheckBox::toggled, + bottomLeftTabWidget, &QGroupBox::setDisabled); + connect(disableWidgetsCheckBox, &QCheckBox::toggled, + bottomRightGroupBox, &QGroupBox::setDisabled); //! [2] //! [3] @@ -279,7 +279,7 @@ void WidgetGallery::createProgressBar() progressBar->setValue(0); QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(advanceProgressBar())); + connect(timer, &QTimer::timeout, this, &WidgetGallery::advanceProgressBar); timer->start(1000); } //! [13] |