diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 74ac6611a5a..1a77aba9dbc 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -796,7 +796,7 @@ void tst_QMessageBox::hideNativeByDestruction() // Make it application modal so that we don't end up with a sheet on macOS dialog->setWindowModality(Qt::ApplicationModal); window.show(); - QVERIFY(QTest::qWaitForWindowActive(&window)); + QVERIFY(QTest::qWaitForWindowExposed(&window)); dialog->open(); // We test that the dialog opens and closes by watching the activation of the