diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-10-01 14:53:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-10-04 13:41:08 +0200 |
commit | 01b31e518ce4fa82c58db6ae89f481be152eb4dc (patch) | |
tree | 777366cee28b3411e97959ccc423ceb4e00a0363 /sources | |
parent | 228ae4b156195df49080d86a5b816952add373d8 (diff) |
Fix hang in test bug_430.py in Qt 6.3
Terminating the application via closing the last window
only works when the window was actually shown.
Add a call to show() and reformat code.
Pick-to: 6.2
Task-number: QTBUG-97033
Change-Id: I1e0a82d1baf1676de5a38c1a8fd2408e104b464a
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/tests/QtWidgets/bug_430.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sources/pyside6/tests/QtWidgets/bug_430.py b/sources/pyside6/tests/QtWidgets/bug_430.py index b6cf49252..6ce463bc7 100644 --- a/sources/pyside6/tests/QtWidgets/bug_430.py +++ b/sources/pyside6/tests/QtWidgets/bug_430.py @@ -44,9 +44,11 @@ class ListModel(QAbstractListModel): return 0 -app = QApplication([]) -model = ListModel() -v = QListView() -v.setModel(model) -QTimer.singleShot(0, v.close) -app.exec() +if __name__ == '__main__': + app = QApplication([]) + model = ListModel() + v = QListView() + v.setModel(model) + v.show() + QTimer.singleShot(0, v.close) + app.exec() |