summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/transformations
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-07 14:17:02 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-01-06 17:07:59 +0000
commitcf27d9e8a5e14ebe083f4b0fa2204d0646e7ed5e (patch)
tree56ab889591e8cdb919f9b5b3ac6a46af6126a2da /examples/widgets/painting/transformations
parent283008e123e5eacb83869682528b2024186634f8 (diff)
Cleanup Widgets examples - new signal/slot syntax
Cleanup the Widget examples - use the new signal/slot syntax where possible - painting and richtext subdirectory Change-Id: If0e365ab1cabf9184076595494cfca151406fddf Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/widgets/painting/transformations')
-rw-r--r--examples/widgets/painting/transformations/window.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/widgets/painting/transformations/window.cpp b/examples/widgets/painting/transformations/window.cpp
index d8babb2e00..8261c4e12e 100644
--- a/examples/widgets/painting/transformations/window.cpp
+++ b/examples/widgets/painting/transformations/window.cpp
@@ -79,8 +79,8 @@ Window::Window()
operationComboBoxes[i]->addItem(tr("Scale to 75%"));
operationComboBoxes[i]->addItem(tr("Translate by (50, 50)"));
- connect(operationComboBoxes[i], SIGNAL(activated(int)),
- this, SLOT(operationChanged()));
+ connect(operationComboBoxes[i], QOverload<int>::of(&QComboBox::activated),
+ this, &Window::operationChanged);
layout->addWidget(transformedRenderAreas[i], 0, i + 1);
layout->addWidget(operationComboBoxes[i], 1, i + 1);
@@ -159,7 +159,8 @@ void Window::setupShapes()
shapes.append(text);
shapes.append(truck);
- connect(shapeComboBox, SIGNAL(activated(int)), this, SLOT(shapeSelected(int)));
+ connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated),
+ this, &Window::shapeSelected);
}
//! [7]