PDA

View Full Version : Destroy() function



lewis
20th July 2006, 19:36
Hi, I'd like to know if calling the destroy() fuction on a QGroupBox will also destroy the layout which was set using GP->setLayout(layout) and the widgets that were added to this layout?

Are they considered as childs? destroy() destroys the childs as well.

Thx

lewis
20th July 2006, 19:45
Ill ask the question in a more general way...

I have a popup window in my QT app, I want a checkbox to set wether or not a TextEdit appears. So when u check the checkbox, a textedit appears, when u uncheck it, it disapears.

Maybe instead of destroying the widget, i should only set them invisible?
I suppose it wont build up in the memory since closing the window will destroy the widgets anyways....?

lewis
20th July 2006, 19:47
Oh well, just found out there is a removeWidget() function, It doesnt delete the items that were added to the groupbox tho...

lewis
20th July 2006, 19:55
Lets try setHidden()!!!