Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.4.0 RC1
-
None
-
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
- replaces
-
QTBUG-46460 MouseArea.containsMouse doesn't revert to false if enabled is set to false
- Closed