diff options
Diffstat (limited to 'examples/widgets/widgets/icons')
-rw-r--r-- | examples/widgets/widgets/icons/imagedelegate.cpp | 3 | ||||
-rw-r--r-- | examples/widgets/widgets/icons/mainwindow.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/examples/widgets/widgets/icons/imagedelegate.cpp b/examples/widgets/widgets/icons/imagedelegate.cpp index 980013daee..3c873f1e24 100644 --- a/examples/widgets/widgets/icons/imagedelegate.cpp +++ b/examples/widgets/widgets/icons/imagedelegate.cpp @@ -71,8 +71,7 @@ QWidget *ImageDelegate::createEditor(QWidget *parent, else if (index.column() == 2) comboBox->addItems(IconPreviewArea::iconStateNames()); - typedef void (QComboBox::*QComboBoxIntSignal)(int); - connect(comboBox, static_cast<QComboBoxIntSignal>(&QComboBox::activated), + connect(comboBox, QOverload<int>::of(&QComboBox::activated), this, &ImageDelegate::emitCommitData); return comboBox; diff --git a/examples/widgets/widgets/icons/mainwindow.cpp b/examples/widgets/widgets/icons/mainwindow.cpp index 5f3882de94..f704b8306f 100644 --- a/examples/widgets/widgets/icons/mainwindow.cpp +++ b/examples/widgets/widgets/icons/mainwindow.cpp @@ -362,8 +362,7 @@ QWidget *MainWindow::createIconSizeGroupBox() sizeButtonGroup = new QButtonGroup(this); sizeButtonGroup->setExclusive(true); - typedef void (QButtonGroup::*QButtonGroupIntBoolSignal)(int, bool); - connect(sizeButtonGroup, static_cast<QButtonGroupIntBoolSignal>(&QButtonGroup::buttonToggled), + connect(sizeButtonGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MainWindow::changeSize); QRadioButton *smallRadioButton = new QRadioButton; @@ -391,8 +390,7 @@ QWidget *MainWindow::createIconSizeGroupBox() //! [26] //! [27] - typedef void (QSpinBox::*QSpinBoxIntSignal)(int); - connect(otherSpinBox, static_cast<QSpinBoxIntSignal>(&QSpinBox::valueChanged), + connect(otherSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &MainWindow::triggerChangeSize); QHBoxLayout *otherSizeLayout = new QHBoxLayout; |