Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.10.1, 5.11.2
-
None
Description
See example.
This bug comes in various forms, but in short if you have a hierarchy like: [MouseArea]>[Pane/Page]>[RowLayout/ColumnLayout/StackLayout]>[Item] (with width, height or preferredWidth/preferredHeight), the root MouseArea will not receive any events as soon as you hover the child. If additionally the Layout of the MouseArea is anchored/ has a specified size, the MouseArea doesn't get any events at all.
import QtQuick 2.6 import QtQuick.Window 2.2 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 Window { id: window visible: true width: 640 height: 480 MouseArea { id: area anchors.fill: parent hoverEnabled: true preventStealing: true propagateComposedEvents: false property color positionColor: Qt.hsla(mouseX / width, 1, mouseY / height, 1); onPositionChanged: console.log(new Date().getTime()) onClicked: console.log("CLICK") Pane { //anchors.fill: parent //this will completely break it leftPadding: 0 rightPadding: 0 topPadding: 0 bottomPadding: 0 RowLayout { anchors.fill: parent Rectangle { color: area.positionColor Layout.preferredWidth: window.width / 2 Layout.preferredHeight: window.height } } } } }