diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 424188eb0ec..f87683580a0 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -1002,6 +1002,7 @@ void tst_QMdiArea::currentSubWindow() QLineEdit dummyTopLevel; dummyTopLevel.show(); QVERIFY(QTest::qWaitForWindowExposed(&dummyTopLevel)); + QVERIFY(QTest::qWaitForWindowActive(&dummyTopLevel)); // Move focus to another top-level and check that we still // have an active window.