Suppose I have a stacked widget, and I use the following code,
QWidget *a = new QWidget; // no qobject parent
stackedWidget->addWidget (a); // does this set the parent of "a" ?
When I delete stackedWidget, I don’t need to delete “a” manually, right?
according to Qt documentation :
“addWidget() Appends the given widget to the QStackedWidget and returns the index position. Ownership of widget is passed on to the QStackedWidget.”
so i think you are right!