PDA

View Full Version : how to remove the pages of QToolBox?



aurora
30th January 2012, 05:43
I have a QToolBox, initially only one page will be there
Latter in run time i'm adding few more pages to it....
Now if click on"clear" button, all the pages except 1st page should remove...
How can i do that?

I tried using
void QToolBox::removeItem ( int index )
but it is not deleting the removed item....

ChrisW67
30th January 2012, 08:06
Now if click on"clear" button, all the pages except 1st page should remove...
How can i do that?

By removing all the items except the first :confused:



I tried using
void QToolBox::removeItem ( int index )
but it is not deleting the removed item....
As the friendly docs say,


void QToolBox::removeItem ( int index )

Removes the item at position index from the toolbox. Note that the widget is not deleted.

If you want the object deleted, then delete it yourself.