diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /examples/widgets/widgets/spinboxes/window.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'examples/widgets/widgets/spinboxes/window.cpp')
-rw-r--r-- | examples/widgets/widgets/spinboxes/window.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/widgets/widgets/spinboxes/window.cpp b/examples/widgets/widgets/spinboxes/window.cpp index 54604e35aa..82e19527a7 100644 --- a/examples/widgets/widgets/spinboxes/window.cpp +++ b/examples/widgets/widgets/spinboxes/window.cpp @@ -53,7 +53,8 @@ #include "window.h" //! [0] -Window::Window() +Window::Window(QWidget *parent) + : QWidget(parent) { createSpinBoxes(); createDateTimeEdits(); @@ -175,8 +176,8 @@ void Window::createDateTimeEdits() formatComboBox->addItem("hh:mm ap"); //! [9] //! [10] - connect(formatComboBox, SIGNAL(activated(QString)), - this, SLOT(setFormatString(QString))); + connect(formatComboBox, &QComboBox::textActivated, + this, &Window::setFormatString); //! [10] setFormatString(formatComboBox->currentText()); @@ -255,9 +256,9 @@ void Window::createDoubleSpinBoxes() priceSpinBox->setPrefix("$"); priceSpinBox->setValue(99.99); - connect(precisionSpinBox, SIGNAL(valueChanged(int)), + connect(precisionSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), //! [17] - this, SLOT(changePrecision(int))); + this, &Window::changePrecision); groupSeparatorSpinBox_d = new QDoubleSpinBox; groupSeparatorSpinBox_d->setRange(-99999999, 99999999); |