summaryrefslogtreecommitdiff
path: root/examples/designer/containerextension/multipagewidget.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-21 11:20:06 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-26 08:52:54 +0000
commit9da07cc30fdf2facaa9d4639ce6ca97509742fc4 (patch)
treeebcb356d4c970be389cf567b83ef28dfe5f596ae /examples/designer/containerextension/multipagewidget.cpp
parent984efb1e87c94ef193035f6b980e57acb78dca7e (diff)
downloadqttools-9da07cc30fdf2facaa9d4639ce6ca97509742fc4.tar.gz
Qt Designer Examples: Brush up to C++ 11
Use nullptr, member initialization, QOverload, etc. Task-number: QTBUG-61184 Change-Id: I45061c506dad72d5f495f480b3e61f4d1c0599d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'examples/designer/containerextension/multipagewidget.cpp')
-rw-r--r--examples/designer/containerextension/multipagewidget.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/designer/containerextension/multipagewidget.cpp b/examples/designer/containerextension/multipagewidget.cpp
index 8bb95180c..d73d3972b 100644
--- a/examples/designer/containerextension/multipagewidget.cpp
+++ b/examples/designer/containerextension/multipagewidget.cpp
@@ -59,11 +59,9 @@ MultiPageWidget::MultiPageWidget(QWidget *parent)
, stackWidget(new QStackedWidget)
, comboBox(new QComboBox)
{
- typedef void (QComboBox::*ComboBoxActivatedIntSignal)(int);
+ comboBox->setObjectName(QStringLiteral("__qt__passive_comboBox"));
- comboBox->setObjectName("__qt__passive_comboBox");
-
- connect(comboBox, static_cast<ComboBoxActivatedIntSignal>(&QComboBox::activated),
+ connect(comboBox, QOverload<int>::of(&QComboBox::activated),
this, &MultiPageWidget::setCurrentIndex);
QVBoxLayout *layout = new QVBoxLayout(this);