Translations:Development/Tutorials/Common Programming Mistakes/60/en: Difference between revisions
Appearance
Importing a new version from external source |
(No difference)
|
Latest revision as of 07:31, 26 October 2019
Qt code involving QObject generally uses parent/child relations to free allocated memory; when constructing a QObject (e.g. a widget) it can be given a parent, and when the parent is deleted it deletes all its children. The parent is also set when you add a widget to a layout, for example.