summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp')
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 2fed2e0c69..802a04b4bf 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -1389,13 +1389,12 @@ void tst_QItemDelegate::comboBox()
QTableWidget widget(1, 1);
widget.setItem(0, 0, item1);
widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
widget.editItem(item1);
- QTestEventLoop::instance().enterLoop(1);
-
- QComboBox *boolEditor = widget.viewport()->findChild<QComboBox*>();
- QVERIFY(boolEditor);
+ QComboBox *boolEditor = nullptr;
+ QTRY_VERIFY( (boolEditor = widget.viewport()->findChild<QComboBox*>()) );
QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially.
// The data must actually be different in order for the model
// to be updated.