I made some tests and it seems that a child widget is automatically deleted by the destructor only by other widgets.
QLayout is not QWidget, so when you delete the QLayout, the child QWidgets are not deleted.
This is right because if you add a QWidget to a QLayout, the parent() of the QWidget is not QLayout, but equals to QLayout->parent().




Reply With Quote
Bookmarks