aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/tests/QtWidgets/bug_430.py14
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()