tags:

views:

45

answers:

1

Hi, i created one QWidget(Parent). in the inside of the parent widget i created another one QWidget(Child). In the run time i need to remove the child widget. how to do that?

i am not using any layout. i am directly putting in the Parent Widget.

Please Help me to fix this.

A: 

If you add the widget with e.g.:

QWidget *w = new QWidget(parent);

...then you can remove it with:

delete w;

Another approach would be to just hide it:

w->hide();
sje397
but i don't know the name of the child widget (in run time also i am creating child widget). how to i find and delete it?,
saravanan
Andrew