Destroy objects
Thu, 02/17/2011 - 13:04
I have created a set of Qtextboxes in one Qform. My problem es that I also have one delete button there and when I push it the textboxes and the button must dissapear from the form.
I have been looking for a solution and proving everything I can but i can't do it. I know at the end it'll be a foolness but can anybody tell me wich method is used to destroy objects?, in other words, after I have done this:
$button = New QButton($this)
I have to destroy it.

One simple way is to just hide the control -
$objControl->Visible = false;
Thanks Alex, that's what I was doing with the control or objects but I didn't know if there was another way to do that. I was thinking and maybe I found one solution to one problem I had with those objects, I'll let you know if it works
You could have them all children of a QPanel, then call RemoveChildControls on that.