Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-109567

Masked MouseArea containsMouse value incorrect after visibility changes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.4.3, 6.5.0, 6.6.0
    • 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.
    • macOS, Windows
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            haiku Ollie Dawes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes