diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp index 1ed33b9233..ebfc5751e7 100644 --- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp +++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp @@ -411,7 +411,10 @@ void tst_QColumnView::scrollTo() ColumnView view(&topLevel); view.resize(200, 200); topLevel.show(); + topLevel.activateWindow(); centerOnScreen(&topLevel); + QVERIFY(QTest::qWaitForWindowActive(&topLevel)); + view.scrollTo(QModelIndex(), QAbstractItemView::EnsureVisible); QCOMPARE(view.HorizontalOffset(), 0);