How to keep a widget after its parent widget death?
Hi,
I created a wizard, and gave it an argument that points to a layout. Then the content of the layout is presented on one page. The problem is that when the wizard is closed, the layout is also deleted. I want to keep the content of that layout. How to do this?
DONG Li
That is how to remove the relationship between parent widget and child widget?
Re: How to keep a widget after its parent widget death?
Code:
child->setParent(0);
Re: How to keep a widget after its parent widget death?
Hi, wysota,
I didn't use setParent, and it works.:confused:
Code:
groupBoxList_dataFormat->at(i)->setLayout(binaryDataFormatUI->at(i)->layout);
Maybe it besause binaryDataFormatUI->at(i)->layout is not declared with setting groupBoxList_dataFormat->at(i) as parent.
Re: How to keep a widget after its parent widget death?
If you move a layout to another widget (if that's possible) then the widgets in a layout get reparented to the new widget.