Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.4.0
-
2af8743aa (dev), b08dcd760 (6.4), c4358550b (6.5)
Description
It happenes from 5.12 to 6.4.
mouseArea1's containsMouse is always true after a click.
The pressed event is propagated so that it's not accepted.
Then, the MouseArea seems to miss the related released event while keeping
the containsMouse 'true'
import QtQuick 2.12 import QtQuick.Window 2.12 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle { id: leftR color: "red" width:200; height: 200 anchors.left: parent.left MouseArea { id: mouseArea1 propagateComposedEvents: true hoverEnabled: false anchors.fill: parent onPressed: { mouse.accepted = false; console.info("pressed", containsMouse);} onContainsMouseChanged: console.info("mouseArea1 containsMouse",containsMouse) } } Rectangle { id: rightR color: "blue" width:200; height: 200 anchors.left: leftR.right MouseArea { id: mouseArea2 hoverEnabled: true anchors.fill: parent //onContainsMouseChanged: console.info("mouseArea2",containsMouse) } } }
Attachments
For Gerrit Dashboard: QTBUG-110594 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
457721,13 | Fix mouse inside MouseArea (containsMouse) for press event | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
459337,2 | Fix mouse inside MouseArea (containsMouse) for press event | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
459338,2 | Fix mouse inside MouseArea (containsMouse) for press event | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |