summaryrefslogtreecommitdiffstats
path: root/examples/svg/svggenerator/window.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-05 07:24:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-18 16:06:53 +0200
commitc2d3f2833a3480d1254233a1c2a567b4e6b8bfdd (patch)
tree62350711df62cbfdaf8b27677f73ca287e9d6203 /examples/svg/svggenerator/window.cpp
parentd882e195406ccedd418f529ecf6320659abf0b5e (diff)
svggenerator example: Remove custom slot definitions
They are a rather obscure feature of Qt Designer and should not be used in examples. Remove custom slot definitions of the form class and move the connections to C++. Change-Id: Ice068ecf269efaf5060d2457096417c7d0df0346 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 4b167ea939d8210982b0bdde17b73d9c9c8f1d4f) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/svg/svggenerator/window.cpp')
-rw-r--r--examples/svg/svggenerator/window.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/svg/svggenerator/window.cpp b/examples/svg/svggenerator/window.cpp
index 0cba3e7..3b983dd 100644
--- a/examples/svg/svggenerator/window.cpp
+++ b/examples/svg/svggenerator/window.cpp
@@ -59,6 +59,12 @@ Window::Window(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
+ connect(shapeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &Window::updateShape);
+ connect(colorButton, &QToolButton::clicked, this, &Window::updateColor);
+ connect(shapeComboBox_2, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ this, &Window::updateBackground);
+ connect(toolButton_2, &QToolButton::clicked, this, &Window::saveSvg);
}
void Window::updateBackground(int background)