[PySide] Is del in python completely equivalent to delete in c for Qt objects?
ijbrewster at alaska.edu
Thu Feb 6 01:23:28 CET 2020
In C++ Qt code, if I do something like the following:
QMainWindow *win=new QMainWindow()
<add other objects to win/do stuff with it>
The QMainWindow, as well as all of its children will be deleted, with the latter half of that statement being the important part. Of course, this child deletion is a Qt thing and not a C thing, as typically calling delete only deletes the thing it was called on. As such, I was wanting to confirm that, when using python/PySide2, calling del on a Qt object would trigger the same child deletion algorithm that delete does in C.
Alaska Volcano Observatory
Geophysical Institute - UAF
2156 Koyukuk Drive
Fairbanks AK 99775-7320
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide