aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-06-19 12:54:43 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-01-18 11:55:02 +0000
commit831efa14e91cfa358e57a32197578d41c2ae1b24 (patch)
tree2cac3e029867d5c53195a5c18c907a60eb56a543 /src/quick
parent948c56ca051d9a2d0f806b8bce3a3170751f5750 (diff)
Update hovered on disabled QQuickItems
Changes handling of hovered so that the property is still updated on disabled items, so that other items can bind to it. This is in particular useful for tooltips. [ChangeLog][Behavior Changes] QQuickItem::hovered will now update even when the item is disabled. Fixes: QTBUG-30801 Pick-to: 6.0 Change-Id: Id17298f657d7631b0e5019138ba33a7d5f863475 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 6a57553b21..446573aae8 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2152,7 +2152,9 @@ bool QQuickWindowPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &sce
QList<QQuickItem *> children = itemPrivate->paintOrderChildItems();
for (int ii = children.count() - 1; ii >= 0; --ii) {
QQuickItem *child = children.at(ii);
- if (!child->isVisible() || !child->isEnabled() || QQuickItemPrivate::get(child)->culled)
+ if (!child->isVisible() || QQuickItemPrivate::get(child)->culled)
+ continue;
+ if (!child->isEnabled() && !QQuickItemPrivate::get(child)->subtreeHoverEnabled)
continue;
if (deliverHoverEvent(child, scenePos, lastScenePos, modifiers, timestamp, accepted))
return true;