Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.2, 5.12.3, 5.12.4, 5.13, 6.4.0 RC1
-
None
Description
I have an Item (I) that contains a MouseArea (MA) as a title bar. When I move I from its initial window to another window while the mouse is hovering over MA, the containsMouse property of MA is not updated.
Here's a minimal example:
import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Window 2.12Window { id: root width: 480 height: 640 visible: true Rectangle { id: rect width: 480 height: 100 color: ma.containsMouse ? "green" : "red" MouseArea { id: ma anchors.fill: parent hoverEnabled: true onClicked: { rect.parent = window2.contentItem } } } Window { id: window2 x: root.x + root.width y: root.y width: 300 height: 300 visible: true } }
Once you click on the rectangle, you'll notice that the rectangle is still green even if the mouse is not hovering over it.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-78014 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
433806,4 | MouseArea: assume hover is lost during window transplant | dev | qt/qtdeclarative | Status: NEW | -1 | 0 |