Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6, 5.9, 5.10
-
None
-
bbcc2657fa0dbf715e6db7d675662e4be94a1e04 (qt/qtdeclarative/dev) 3f14cae462c890e22aa1948e1dec60d297dd0b23 (qt/qtdeclarative/6.2)
Description
When a disabled MouseArea overlaps another (active) one, the disabled item prevents the visible one to get hover events, and additionally creates a bug because on click the visible item will get a mouse enter and no mouse exit. So it will stay hovered forever.
Documentation states :
The enabled property is used to enable and disable mouse handling for the proxied item. When disabled, the mouse area becomes transparent to mouse events
So it seems like a bug that a disable MouseArea is stealing events anyway.
Here is the minimal code to reproduce :
import QtQuick 2.1; import QtQuick.Window 2.1; Window { id: window; width: 800; height: 600; visible: true; MouseArea { width: 400; height: 300; hoverEnabled: true; anchors.centerIn: parent; Text { text: parent.containsMouse; font.pixelSize: 42; anchors.centerIn: parent; } Rectangle { color: "yellow"; border.color: "black"; border.width: (parent.containsMouse ? 2 : 0); anchors.fill: parent; } } MouseArea { enable: false; // replace with visible:false to workaround bug hoverEnabled: true; anchors.fill: parent; } }
Attachments
Issue Links
- relates to
-
QTBUG-72843 HoverHandler is unreliable
- Closed
For Gerrit Dashboard: QTBUG-63670 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
337003,22 | QQuickHoverHandler: don't use passive grabs | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
339134,8 | WIP: don't use passive grabs, auto test failure check | dev | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |
357842,2 | QQuickHoverHandler: don't use passive grabs | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |