diff options
Diffstat (limited to 'tests/auto/qmltest/events/tst_events.qml')
-rw-r--r-- | tests/auto/qmltest/events/tst_events.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qmltest/events/tst_events.qml b/tests/auto/qmltest/events/tst_events.qml index e655c26c7d..d9868a316c 100644 --- a/tests/auto/qmltest/events/tst_events.qml +++ b/tests/auto/qmltest/events/tst_events.qml @@ -27,6 +27,7 @@ ****************************************************************************/ import QtQuick 2.0 +import QtQuick.Window 2.0 import QtTest 1.1 Rectangle { @@ -56,6 +57,16 @@ Rectangle { signalName: "doubleClickSignalHelper" } + Window { + id: sub + visible: true + property bool clicked: false + MouseArea { + anchors.fill: parent + onClicked: sub.clicked = true + } + } + MouseArea { anchors.fill: parent onClicked: { @@ -89,6 +100,11 @@ Rectangle { tryCompare(top, "mouseHasBeenClicked", true, 10000) } + function test_mouse_click_subwindow() { + mouseClick(sub) + tryCompare(sub, "clicked", true, 10000) + } + function test_mouse_doubleclick() { doubleClickSpy.clear() mouseDoubleClickSequence(top, 25, 30) |