aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtQml/bug_847.py
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-27 14:20:36 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-27 14:20:36 +0200
commit25f899e276c00b8d7f334819d6cd7927ed67093a (patch)
treed2a063aab76e0435eb862ca5d2b541a5e718f062 /sources/pyside2/tests/QtQml/bug_847.py
parent4725008aeea407ae55cfd66de802dd9e06412efc (diff)
parente30e0c161b2b4d50484314bf006e9e5e8ff6b380 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.9
Diffstat (limited to 'sources/pyside2/tests/QtQml/bug_847.py')
-rwxr-xr-xsources/pyside2/tests/QtQml/bug_847.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/pyside2/tests/QtQml/bug_847.py b/sources/pyside2/tests/QtQml/bug_847.py
index e46888d17..e69bd201a 100755
--- a/sources/pyside2/tests/QtQml/bug_847.py
+++ b/sources/pyside2/tests/QtQml/bug_847.py
@@ -66,11 +66,18 @@ class TestQML(UsesQApplication):
# Connect first, then set the property.
view.called.connect(self.done)
view.setSource(QUrl.fromLocalFile(adjust_filename('bug_847.qml', __file__)))
+ while view.status() == QQuickView.Loading:
+ self.app.processEvents()
+ self.assertEqual(view.status(), QQuickView.Ready)
+ self.assertTrue(view.rootObject())
view.rootObject().setProperty('pythonObject', view)
view.show()
+ while not view.isExposed():
+ self.app.processEvents()
+
# Essentially a timeout in case method invocation fails.
- QTimer.singleShot(2000, QCoreApplication.instance().quit)
+ QTimer.singleShot(30000, QCoreApplication.instance().quit)
self.app.exec_()
self.assertTrue(self._sucess)