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

HoverHandler and MouseArea: if hover is enabled/disabled but mouse does not move AND no item is marked dirty, state doesn't change immediately

    XMLWordPrintable

Details

    • 4d46d4e1cf (qt/qtdeclarative/dev) 4a97a92260 (qt/qtdeclarative/6.4) 4a97a92260 (qt/tqtc-qtdeclarative/6.4)

    Description

      Can be tested by commenting out one line in tests/auto/quick/pointerhandlers/qquickhoverhandler/data/lesHoverables.qml :

      // comment out this color change to test whether we rely on "dirty" items to
      // trigger QQuickDeliveryAgentPrivate::flushFrameSynchronousEvents() to update hover state
      //            color: cbRoot.checked ? "cadetblue" : "transparent"
      

      and run it with qml.  Hover either of the buttons in the top sidebar.  If you are hovering the button that has a HoverHandler, and you toggle the enabled property by pressing Control-H,  it will still appear hovered, but if you move the mouse, you can see that hover is disabled.  Toggle it back again with Control-H again, and it doesn't hover again until you move the mouse.

      Likewise with the MouseArea: use Control-M to toggle the MouseArea.hoverEnabled property.

      If the mouse does not move, there's no event to deliver; and if no items have been marked dirty, we don't call flushFrameSynchronousEvents().  So nothing updates the hover state.

      Perhaps we should do hover updating for each key event too, or mark an item dirty if either of these properties changes (either the MouseArea itself or HoverHandler's parent item, respectively).

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-106704
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes