From 0ab8f278b27991b0c87cd2eb673859c7d04bd9ef Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 1 Apr 2022 13:16:14 +0200 Subject: [PATCH] Add hack to get mouse handling working again --- resources/qml/Cura.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 2b419a5d76..4bfc2959a2 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -48,6 +48,22 @@ UM.MainWindow tooltip.hide(); } + MouseArea + { + // Hack introduced when switching to qt6 + // We used to be able to let the main window's default handlers control this, but something seems to be changed + // for qt6 in the ordering. TODO; We should find out what changed and have a less hacky fix for that. + enabled: parent.visible + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.AllButtons + onPositionChanged: (mouse) => {base.mouseMoved(mouse);} + onPressed: (mouse) => { base.mousePressed(mouse);} + onReleased: (mouse) => { base.mouseReleased(mouse);} + onWheel: (wheel) => {base.wheel(wheel)} + + } + Rectangle { id: greyOutBackground