summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 4fc18be3d2..36ec28de8d 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -56,6 +56,7 @@ private slots:
void create();
void setParent();
void setVisible();
+ void setVisibleFalseDoesNotCreateWindow();
void eventOrderOnShow();
void resizeEventAfterResize();
void exposeEventOnShrink_QTBUG54040();
@@ -234,6 +235,16 @@ void tst_QWindow::setVisible()
QVERIFY(QTest::qWaitForWindowExposed(&i));
}
+void tst_QWindow::setVisibleFalseDoesNotCreateWindow()
+{
+ QWindow w;
+ QVERIFY(!w.handle());
+ w.setVisible(false);
+ QVERIFY2(!w.handle(), "Hiding a non-created window doesn't create it");
+ w.setVisible(true);
+ QVERIFY2(w.handle(), "Showing a non-created window creates it");
+}
+
void tst_QWindow::mapGlobal()
{
QWindow a;