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

MouseArea.containsMouse becomes false when rejecting press event

    XMLWordPrintable

Details

    • d054755e9e452df05fb590510d25bf4167b97af7

    Description

      Value of the property 'containsMouse' is incorrect for a MouseArea that rejects mouse events on press (onPressed: mouse.accepted = false) and is a child of another MouseArea.

      Launch the test program (nested_mouse_area.qml) and follow these steps:
      1. Put the mouse cursor inside the grey rectangle
      2. Press the left mouse button
      3. Release the mouse button
      4. Press the left mouse button

      After step 1., containsMouse is expectedly set to true.
      After step 2., containsMouse is unexpectedly set to false even though the mouse is still over the MouseArea.
      After step 3., containsMouse is unexpectedly set to true then false even though the mouse is still over the MouseArea.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              kaleo Florian Boucault
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes