Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4
-
None
Description
in qt 5 overlapping HoverHandler acts as there is no z -z-order - so the overlapping does not affect onEntered ,onExited of the 2 areas
in qt6
there is a z-order (first bug!) also, moving the cursor from a bigger z-order to small
we get (the correct logic of overlapping mouse area)
qml: blue onEntered
qml: blue onExited
qml: red onEntered
qml: red onExited
but moving the curser from lower z order to big, we get the wrong logic(for overlapping mouse area) - first enter blue before exiting red area (second bug??)
qml: red onEntered
qml: blue onEntered
qml: red onExited
qml: blue onExited
check out the following code
TNX
Rectangle { id:red //x:100 y:350 width:250 height:250 color: "red"; HoverHandler { id: redHoverHandler onHoveredChanged: { if ( redHoverHandler.hovered )
{ console.log("red onEntered") } else { console.log("red onExited") } } } }
Rectangle { id:blue x:100 y:350 width:250 height:250 color: "blue"; HoverHandler { id: blueHoverHandler onHoveredChanged: { if ( blueHoverHandler.hovered )
else { console.log("blue onExited") } } } }