diff options
| author | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2024-11-22 15:51:18 +0100 |
|---|---|---|
| committer | Jaime Resano <Jaime.RESANO-AISA@qt.io> | 2024-11-25 11:11:46 +0000 |
| commit | 4274aaed897e713fc628e4dcec93ac6a5f704af0 (patch) | |
| tree | d19345c8d515988857fb78a3f6d203b00cd23a1f /sources/pyside6/doc/tutorials/qmlsqlintegration | |
| parent | 78ac4b40a5da489036885def98e5108fdd56cdbc (diff) | |
Delete QQmlApplicationEngine on application exit
Due to the API limitations, we have to ensure that the engine is deleted
before other parts of the application is deleted. Otherwise exposing
objects using setInitialProperties() or setContextProperty() for example
will cause warnings to be printed. It is a good practice to always
delete the engine manually so all the code should be consistent.
Task-number: PYSIDE-1612
Pick-to: 6.8
Change-Id: I01f16359e9d90cefd5957708fe12ce489bd7edc0
Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/doc/tutorials/qmlsqlintegration')
| -rw-r--r-- | sources/pyside6/doc/tutorials/qmlsqlintegration/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py index e42f8f2e9..e514adda8 100644 --- a/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py +++ b/sources/pyside6/doc/tutorials/qmlsqlintegration/main.py @@ -55,5 +55,6 @@ if __name__ == "__main__": if not engine.rootObjects(): sys.exit(-1) - app.exec() + exit_code = app.exec() del engine + sys.exit(exit_code) |
