PDA

View Full Version : How to get list of DockWidgets in QMainWindow?



QPlace
27th July 2009, 01:33
There is a list of tabbified widgets that I can get from mainwindow, but how can I get a list of all dockwidgets in the mainwindow?

spirit
27th July 2009, 07:20
try to use QObject::findChildren, i.e. in your case a code in a main window should look like:


...
QList<QDockWidget *> dockWidgets = findChildren<QDockWidget *>();
...