QWidget deleting itself when on QStackedWidget
-
Hi,
Shoudn't you just try it? I do believe that you are generating a memory leak issue here. Before you delete an object, you should verify that all used references are removed. But if you have read this:int QStackedWidget::addWidget(QWidget * widget)
Appends the given widget to the QStackedWidget and returns the index position. Ownership of widget is passed on to the QStackedWidget.
from the docs you will see that the QStackedWidget is the owner of the widget, so if you delete the widget, the parent of that widget will remove it from it's child list and I presume that it will also delete it from it's QStackedWidget list.