Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
Description
In QML when some MouseArea gets scaled to 0 (due to some animation on parent visual item) it seems the MouseArea is moved to (0; 0) at full scale.
Consider the simple example listed below. There's a red rectangle with a mouse area at (0;0) and a blue rect with a mousearea somewhere else. A click on the background will toggle the scale of the blue rect. When the scale of the blue rect is 0, the signal handler of the blue rect is executed when I click the red rectangle.
Window { width: 640 height: 480 visible: true title: qsTr("Hello World") MouseArea { anchors.fill: parent onClicked: blueRect.scale = (blueRect.scale === 1) ? 0 : 1 } Rectangle { width: 100 height: 100 color: "red" MouseArea { anchors.fill: parent onClicked: console.log("Red rect clicked") } } Rectangle { id: blueRect x: 200 y: 200 width: 100 height: 100 color: "blue" MouseArea { anchors.fill: parent onClicked: console.log("Blue rect clicked") } } }