summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/charactermap/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/widgets/charactermap/mainwindow.cpp')
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/widgets/widgets/charactermap/mainwindow.cpp b/examples/widgets/widgets/charactermap/mainwindow.cpp
index 8b406ba1ca..5f17128a2f 100644
--- a/examples/widgets/widgets/charactermap/mainwindow.cpp
+++ b/examples/widgets/widgets/charactermap/mainwindow.cpp
@@ -74,8 +74,7 @@ MainWindow::MainWindow()
filterCombo->addItem(tr("Monospaced"), QVariant::fromValue(QFontComboBox::MonospacedFonts));
filterCombo->addItem(tr("Proportional"), QVariant::fromValue(QFontComboBox::ProportionalFonts));
filterCombo->setCurrentIndex(0);
- typedef void (QComboBox::*QComboBoxIntSignal)(int);
- connect(filterCombo, static_cast<QComboBoxIntSignal>(&QComboBox::currentIndexChanged),
+ connect(filterCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &MainWindow::filterChanged);
QLabel *fontLabel = new QLabel(tr("Font:"));
@@ -114,10 +113,9 @@ MainWindow::MainWindow()
this, &MainWindow::findSizes);
connect(fontCombo, &QFontComboBox::currentFontChanged,
characterWidget, &CharacterWidget::updateFont);
- typedef void (QComboBox::*QComboBoxStringSignal)(const QString &);
- connect(sizeCombo, static_cast<QComboBoxStringSignal>(&QComboBox::currentIndexChanged),
+ connect(sizeCombo, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
characterWidget, &CharacterWidget::updateSize);
- connect(styleCombo, static_cast<QComboBoxStringSignal>(&QComboBox::currentIndexChanged),
+ connect(styleCombo, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
characterWidget, &CharacterWidget::updateStyle);
//! [4] //! [5]
connect(characterWidget, &CharacterWidget::characterSelected,