Fix tst_QColumnView::scrollTo()
The test relies on active focus, so activate the test window in the beginning of the test to avoid undesired focus widget changes by QApplication::setActiveWindow() during the test. Task-number: QTBUG-36395 Change-Id: I6febec7d552224b1754aaf57520ed6d435d29563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
b66950b342
commit
3a4b8cbc3d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user