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

MouseArea.onEntered not fired if component arrives under mouse

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.8.0 Alpha
    • 5.6.0
    • None
    • Os X 10.11, Windows 7 64bit
    • 6f84a09dfbd15aac023580cf06e7b8c24f3b524c

    Description

      When a qml component is moved underneath the mouse pointer, the MouseArea.onEntered is not fired until the user moves the mouse at least 1 px.

      I have attached an example mouseevents.qml file (and a video of this example) demonstrating the problem, it displays two squares, one red and one yellow, if the red square is clicked it is removed and the yellow square takes its place on screen. The yellow square is now under the mouse but has received no onEntered event.

      I would expect the object now under the mouse to receive the onEntered event without the user having to first wiggle the mouse.

      The real life instance of this occurring is where we have a ListView of elements with a uniform height. Each element has a 'delete' button on it that removes the row from the list, each button is also set to animate on mouse hover.

      When you hit the delete button the row is removed and the list elements below are shifted up, the mouse, which has not moved, is now hovering over the delete button of the next row (which has moved up to take the place of the deleted row) but the hover animation never fires.

      Attachments

        1. mouse_events.mov
          2.81 MB
        2. mouseevents.qml
          0.7 kB

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              neil Neil Williams
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes