Details
-
Bug
-
Resolution: Cannot Reproduce
-
P3: Somewhat important
-
None
-
5.0.0, 5.4.0 RC
-
None
Description
In the code below, the second MouseArea shouldn't steal any events, but it does steal hover events. Strangely though, it doesn't receive position changes, it just prevents other MouseAreas below it from receiving hover events.
import QtQuick 2.0 Item { width: 400 height: 400 MouseArea { anchors.fill: parent hoverEnabled: true onClicked: print("clicked") onPressed: print("pressed") onReleased: print("released") onPositionChanged: print("position", mouse.x, mouse.y) } MouseArea { enabled: false onEnabledChanged: print("blocking mouse area", enabled ? "enabled" : "disabled") hoverEnabled: true onPositionChanged: print("blocking mouse area position changed", mouse.x, mouse.y) // Workaround: // hoverEnabled: enabled anchors.fill: parent onClicked: currentMenu = -1 } }
A workaround is to set hoveredEnabled to the enabled property.
Attachments
Issue Links
- duplicates
-
QTBUG-33050 a disabled or invisible MouseArea should not contain cursor
-
- Open
-