thp / pyotherside

Python Bindings for Qt 5 and Qt 6. Allows you to access a CPython 3 interpreter directly from your Qt QML user interface code.
https://thp.io/2011/pyotherside/
Other
364 stars 49 forks source link

Python interpreter not destroyed when parent QML is destroyed #110

Open accumulator opened 5 years ago

accumulator commented 5 years ago

When unloading a QML component that contains a Python QML element (in my case through QmlLive feature of QtCreator, i.e. QQuickView->setSource(..)), the python interpreter seems to stay alive.

The reload of the parent component succeeds, but then the python interpreter seems to have kept its state, and does not re-execute the code from the module imports..

thp commented 5 years ago

Thanks for your report. This can probably be done with Py_FinalizeEx.