Hi,

I have a QStackedwidget that contains multiple QTableWidget. How can i parse all of the
QTablewidget from the Qstackedwidget.

example of my test, and the dynamic_cast is always false , is there a better way ?

for (int i=0;i<stackedWidget->count() ; i++)
{
QWidget *poChild = stackedWidget->widget(i);
if (poChild && dynamic_cast<QTableWidget*>(poChild) )
{
QTableWidget *poTBL = dynamic_cast<QTableWidget*>(poChild);
poTBL->setColumnCount(0);
poTBL->setRowCount(0);
}
}

thanks,