aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickswitch.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-29 12:57:53 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-12-02 12:18:20 +0000
commit0a37852dd814159d901791b9ea7f59a6dd21837c (patch)
tree861d676751013ac0427467840fafb6e9556e9241 /src/quicktemplates2/qquickswitch.cpp
parent15fab6e8f81c7fd643f7c4e6a7979a2f66ec4060 (diff)
Add AbstractButton::toggled() signal
[ChangeLog][Controls][AbstractButton] Added a toggled() signal that is emitted whenever a checkable button is interactively toggled by the user by using either touch, mouse, or keys. Task-number: QTBUG-57203 Change-Id: If0b0d71d19cbed00f04d8a4309894a055c4254c6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickswitch.cpp')
-rw-r--r--src/quicktemplates2/qquickswitch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickswitch.cpp b/src/quicktemplates2/qquickswitch.cpp
index fa08a1d8..b967fe56 100644
--- a/src/quicktemplates2/qquickswitch.cpp
+++ b/src/quicktemplates2/qquickswitch.cpp
@@ -187,7 +187,7 @@ void QQuickSwitch::nextCheckState()
{
Q_D(QQuickSwitch);
if (keepMouseGrab())
- setChecked(d->position > 0.5);
+ d->toggle(d->position > 0.5);
else
QQuickAbstractButton::nextCheckState();
}