aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/editingmodel/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/editingmodel/main.py')
-rw-r--r--examples/qml/editingmodel/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/qml/editingmodel/main.py b/examples/qml/editingmodel/main.py
index aa39460aa..cccbd2b0d 100644
--- a/examples/qml/editingmodel/main.py
+++ b/examples/qml/editingmodel/main.py
@@ -16,7 +16,9 @@ if __name__ == "__main__":
engine = QQmlApplicationEngine()
qml_file = Path(__file__).parent / "main.qml"
engine.load(QUrl.fromLocalFile(qml_file))
-
if not engine.rootObjects():
sys.exit(-1)
- sys.exit(app.exec())
+
+ exit_code = app.exec()
+ del engine
+ sys.exit(exit_code)