Say I have something like this:
void someClass::start()
{
QLabel* label = new QLabel();
label->setText("Hello World");
ui.verticalLayout->addWidget(label);
}
Does addWidget
make label
a child of someClass
so that when I delete someClass
, label
is also deleted? If this is true, how do I know which methods in general assign parents to an object?
parent()
method. – Ogee