diff options
Diffstat (limited to 'tests/auto/qlistview/tst_qlistview.cpp')
-rw-r--r-- | tests/auto/qlistview/tst_qlistview.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index d9cab02..cba1776 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -1617,6 +1617,8 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates() list.setModel(&model); list.setViewMode(QListView::IconMode); list.show(); + QTest::qWaitForWindowShown(&list); + class MyItemDelegate : public QStyledItemDelegate { public: @@ -1631,10 +1633,9 @@ void tst_QListView::task254449_draggingItemToNegativeCoordinates() mutable int numPaints; } delegate; list.setItemDelegate(&delegate); - delegate.numPaints = 0; - QTest::qWaitForWindowShown(&list); //makes sure the layout is done - QTRY_VERIFY(delegate.numPaints > 0); + QApplication::processEvents(); + QTRY_VERIFY(delegate.numPaints > 0); //makes sure the layout is done const QPoint topLeft(-6, 0); list.setPositionForIndex(topLeft, index); |