Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.3
-
None
-
-
0c7b0a4306 (qt/qtdeclarative/dev) d4c31ec0cd (qt/qtdeclarative/6.2) 66d6c7ec01 (qt/qtdeclarative/6.3) d4c31ec0cd (qt/tqtc-qtdeclarative/6.2)
Description
Qt Quick Control (and its derivatives, like Button) doesn't propagate hover to his parent control.
It looks like a regression happened somewhere in Qt 6 comparing with Qt 5.15.2 original behaviour.
Code sample:
import QtQuick import QtQuick.Window import QtQuick.Controls Window { width: 640 height: 480 visible: true component CustomControl: Control { // you can use just a regular Button instead id: control hoverEnabled: true background: Rectangle { color: control.hovered ? 'red' : 'white' border.width: 1 } } CustomControl { anchors.fill: parent onHoveredChanged: console.log('Outer hovered: ' + hovered) CustomControl { anchors.centerIn: parent width: parent.width / 2 height: parent.height / 2 onHoveredChanged: console.log('Inner hovered: ' + hovered) } } }
Steps to reproduce:
Just run the sample code and move mouse from window's side to center. This will produce next output:
qml: Outer hovered: true qml: Inner hovered: true qml: Outer hovered: false
Attachments
Issue Links
- relates to
-
QTBUG-95726 [REG 5.15.2-6.2.0] MouseArea loses hover when cursor is inside of nested MouseArea
- Closed