aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-15 07:38:53 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-15 11:16:31 +0000
commitc886facd990acf207f3164662601222babc8dde2 (patch)
treeb29476b157bc0031d5148e690c1cd6d6476fccb2 /src
parente83cbaddbfec2aaae157ef0223f1e8d38a3d37bc (diff)
QQuickControl: clear the hovered state when hidden
Task-number: QTBUG-56007 Change-Id: I6433e0ebc9570b1e9e6e149ef7f631ea6786f672 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickcontrol.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp
index 642e2e72..dc8ad4c9 100644
--- a/src/quicktemplates2/qquickcontrol.cpp
+++ b/src/quicktemplates2/qquickcontrol.cpp
@@ -397,6 +397,10 @@ void QQuickControl::itemChange(QQuickItem::ItemChange change, const QQuickItem::
Q_D(QQuickControl);
QQuickItem::itemChange(change, value);
switch (change) {
+ case ItemVisibleHasChanged:
+ if (!value.boolValue)
+ setHovered(false);
+ break;
case ItemParentHasChanged:
if (value.item) {
d->resolveFont();