aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcheckbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickcheckbox.cpp')
-rw-r--r--src/quicktemplates2/qquickcheckbox.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickcheckbox.cpp b/src/quicktemplates2/qquickcheckbox.cpp
index 4cdfcd28..dd36121e 100644
--- a/src/quicktemplates2/qquickcheckbox.cpp
+++ b/src/quicktemplates2/qquickcheckbox.cpp
@@ -173,9 +173,12 @@ QFont QQuickCheckBox::defaultFont() const
return QQuickControlPrivate::themeFont(QPlatformTheme::CheckBoxFont);
}
-void QQuickCheckBox::checkStateSet()
+void QQuickCheckBox::buttonChange(ButtonChange change)
{
- setCheckState(isChecked() ? Qt::Checked : Qt::Unchecked);
+ if (change == ButtonCheckedChange)
+ setCheckState(isChecked() ? Qt::Checked : Qt::Unchecked);
+ else
+ QQuickAbstractButton::buttonChange(change);
}
void QQuickCheckBox::nextCheckState()