Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.0, 6.9.0
-
None
Description
MouseArea hovering detection only work for front side. To reproduce verify that rectangle turns red on hovered. Then click "Flip". Then verify that rectangle does not turn red on hover anymore.
import QtQuick import QtQuick.Layouts Window { width: 640 height: 480 visible: true title: qsTr("Hello World") ColumnLayout { anchors.fill: parent Flipable { id: flip property bool flipped: false Layout.fillHeight: true Layout.fillWidth: true front: Rectangle { anchors.fill: parent color: mouseFront.containsMouse ? 'red' : 'green' MouseArea { id: mouseFront hoverEnabled: true anchors.fill: parent } } back: Rectangle { anchors.fill: parent color: mouseBack.containsMouse ? 'red' : 'blue' MouseArea { id: mouseBack hoverEnabled: true anchors.fill: parent } } transform: Rotation { id: rotation origin.x: flip.width/2 origin.y: flip.height/2 axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis angle: 0 // the default angle } states: State { name: "back" PropertyChanges { target: rotation; angle: 180 } when: flip.flipped } transitions: Transition { NumberAnimation { target: rotation property: "angle" duration: 500 easing.type: Easing.OutQuad } } } Rectangle { Layout.fillWidth: true Layout.preferredHeight: 100 Text { anchors.centerIn: parent text: 'Flip' } MouseArea { anchors.fill: parent onClicked: flip.flipped = !flip.flipped } } } }
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-136118 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
642431,6 | Flipable: document and test hovering both sides | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |