Hi.,
i am using Qwidget(parent). this parent widget contains lot of child widget. in the run time i need to clear all the child widgets from the parent.
How to do this? Please help me...
Hi.,
i am using Qwidget(parent). this parent widget contains lot of child widget. in the run time i need to clear all the child widgets from the parent.
How to do this? Please help me...
You can use the following in your parent widget class:
QList<QWidget *> widgets = findChildren<QWidget *>();
foreach(QWidget * widget, widgets)
{
delete widget;
}