aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_popup.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-01-24 09:53:28 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-01-24 10:13:01 +0000
commit1041a95eb07e5cd25d96eec9dfc2243144638183 (patch)
treed76492bb4171c98e81f52584cf51bf362445a980 /tests/auto/controls/data/tst_popup.qml
parent29c0ac9a950d063e627a077189b33aaf4810cf89 (diff)
QQuickPopup: allow QQuickWindow as a parent
Previously it would unintuitively complain that "cannot find any window to open popup in" if a window was passed as a parent. Change-Id: I984d4c941afae12733a9c1c2f0441da867298aa1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_popup.qml')
-rw-r--r--tests/auto/controls/data/tst_popup.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_popup.qml b/tests/auto/controls/data/tst_popup.qml
index ee98e2ae..d9630142 100644
--- a/tests/auto/controls/data/tst_popup.qml
+++ b/tests/auto/controls/data/tst_popup.qml
@@ -1260,4 +1260,14 @@ TestCase {
compare(control.y, (control.parent.height - control.height) / 2)
window.destroy()
}
+
+ function test_windowParent() {
+ var control = popupControl.createObject(applicationWindow, {width: 100, height: 100})
+ verify(control)
+
+ control.open()
+ verify(control.visible)
+
+ control.destroy()
+ }
}