Removing item from layout without deleting it.
Hi. I've got a problem. I have a QFromLayout. And I want to remove item from layout without actual deleting that item. I've tried removeItem and takeAt functions but it doesn't work: items are still visible. My goal is to replace some items with others items, after button click, but I need to have access to data in items which aren't visible. Can you tell me what am I doing wrong?
Re: Removing item from layout without deleting it.
Removing item from a layout doesn't remove it from the parent widget. If you want to remove a widget from its parent then call setParent() passing in 0.
Re: Removing item from layout without deleting it.
Thank you:) So simple solution.