I don't see any QMainWindow method for accessing its QDockWidgets. Is there a better way to do this than to call children() and loop through the Objectlist and dynamic cast as QDockWidget?
I don't see any QMainWindow method for accessing its QDockWidgets. Is there a better way to do this than to call children() and loop through the Objectlist and dynamic cast as QDockWidget?
Hi
Actually don't understand what you exactly want to do with Dock widget.
But QMainWindow has the methods related to Doc Widget as,
addDockWidget ( Qt:ockWidgetArea, QDockWidget * )
addDockWidget ( Qt:ockWidgetArea, QDockWidget *, Qt::Orientation )
dockOptions () const : DockOptions
dockWidgetArea ( QDockWidget * ) const : Qt:ockWidgetArea
.... Etc.. and lots of to access and manage the Doc Widget.
Refer the Qt documentation to understand it better.
Thanks
Prashant Moglaikar
None of the methods you mention or those described in the documentation seem to actually provide access to the dock widgets. Lets say you want to provide a toolbar button that hides all dock widgets. How do you access the dock widgets?
try
Qt Code:
findChildren<QDockWidget*>To copy to clipboard, switch view to plain text mode
gkarthick5 (29th July 2011)
Bookmarks