[PySide] Is del in python completely equivalent to delete in c for Qt objects?
Israel Brewster
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>
delete win
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.
---
Israel Brewster
Software Engineer
Alaska Volcano Observatory
Geophysical Institute - UAF
2156 Koyukuk Drive
Fairbanks AK 99775-7320
Work: 907-474-5172
cell: 907-328-9145
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20200205/6263f43c/attachment.html>
More information about the PySide
mailing list