Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.2, 5.1.0 , 5.15.2
-
None
-
bbcc2657fa0dbf715e6db7d675662e4be94a1e04 (qt/qtdeclarative/dev) 3f14cae462c890e22aa1948e1dec60d297dd0b23 (qt/qtdeclarative/6.2)
Description
In the following example you can move the mouse from the white, to blue, to orange Rectangles and see the two Rectangles correctly handle hover events (and change color).
However, if you uncomment the line noted below, and move the mouse directly from white to orange, both blue and orange Rectangles will incorrectly display as hovered. The implementation appears to assume that the inner Rectangle is wholly contained by the outer Rectangle, so both should receive hover.
import QtQuick 2.0 Item { width: 400; height: 400 Rectangle { width: 300; height: 300 anchors.centerIn: parent color: ma1.containsMouse ? "green" : "blue" MouseArea { id: ma1 anchors.fill: parent hoverEnabled: true Rectangle { width: 200; height: 200 // + 200 // uncomment to see issue anchors.centerIn: parent color: ma2.containsMouse ? "yellow" : "orange" MouseArea { id: ma2 anchors.fill: parent hoverEnabled: true } } } } }
Attachments
Issue Links
- relates to
-
QTBUG-72843 HoverHandler is unreliable
- Closed
For Gerrit Dashboard: QTBUG-34882 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
337003,22 | QQuickHoverHandler: don't use passive grabs | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
339134,8 | WIP: don't use passive grabs, auto test failure check | dev | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |
357842,2 | QQuickHoverHandler: don't use passive grabs | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |