I have tried the above mention code still I am not able to iterate through dockwidget list still list is not being intialized properly.
QDockWidget * pDockWidget;

QList<QDockWidget*>dw = qFindChildren<QDockWidget*>(mainWindow, QString());

for (int i = 0; i < dw.size(); ++i)

{
dw.at(i)->display();
}

r I have tried the following too.


QList<QDockWidget*> dw = qFindChildren<QDockWidget*>(mainWindow);

QListIterator<QDockWidget *> i(dw);
while (i.hasNext())
{
i.next()->display();
}