Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.4.0, 6.5.0 FF
-
None
-
Tested with qt 6.4 and the latest dev build of qt (164d8f66d82deea74464c68a2cdd19e5998835da) on Windows and also tested with qt 6.5 ish custom build on mac.
-
-
000df0865 (dev), 395164233 (6.5), 041717ae6 (6.4)
Description
Given two hoverable MouseAreas A & B where B masks A, the `containsMouse` property of A will be incorrect if the cursor is positioned above both A & B and the visibility of A is toggeled.
Steps to reproduce the issue:
1. Run the attached project
2. Click in the centre of the window to move both mouse areas under the cursor (now only the top level MouseArea should be hovered)
3. Press enter twice to toggle the visibility of the bottom MouseArea (now both MouseAreas should be hovered which is incorrect).
Extra:
The attached project also adds a containment mask to the bottom MouseArea but this is not required it is just to show that if you carry out the above steps and then move the cursor diagonally in the direction of the top left corner of the bottom MouseArea that you can move the mouse completely out of both mouse areas and still have the bottom MouseArea's `containsMouse` property set to true.
Note:
I have a potential fix I will push to Gerrit shortly. I have pushed a potential fix for the above here: https://codereview.qt-project.org/c/qt/qtdeclarative/+/450119