diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-16 14:29:40 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-01-17 13:09:16 +0000 |
commit | 317908e72a6ea0b4ca179690539cb352bbf60832 (patch) | |
tree | e32226a67a3de6b084a096f8d1cf0c2d12fe35e0 /tests/auto/quickwidgets/qquickwidget/data | |
parent | 6b1682870c20a0fc86e0bb2ea8d63c3d1df1be86 (diff) |
Use localPos for windowPos when passing mouse events to QQuickWidgetv5.9.4
QQuickWidget thinks of itself as a toplevel window, so it cannot process
the offsets in a parent window.
Amends 41293196b4db1aa7a0c616af312875c484639644.
Task-number: QTBUG-65800
Change-Id: I8c5dcb8f44a6cbdb58bcc956d8263e68d8180bec
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests/auto/quickwidgets/qquickwidget/data')
-rw-r--r-- | tests/auto/quickwidgets/qquickwidget/data/mouse.qml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/quickwidgets/qquickwidget/data/mouse.qml b/tests/auto/quickwidgets/qquickwidget/data/mouse.qml new file mode 100644 index 0000000000..5d1c6e8443 --- /dev/null +++ b/tests/auto/quickwidgets/qquickwidget/data/mouse.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 + +Rectangle { + width: 50 + height: 50 + + property bool wasClicked: false + property bool wasDoubleClicked: false + property bool wasMoved: false + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onClicked: wasClicked = true + onDoubleClicked: wasDoubleClicked = true + onMouseXChanged: wasMoved = true + } +} |