diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 68850c4eb9b..958097e07c8 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -797,7 +797,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