View Full Version : accessing qdockwidgets given the qmainwindow
TheClassic
23rd July 2011, 15:14
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?
Prashant_Moglaikar
25th July 2011, 07:33
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::DockWidgetArea, QDockWidget * )
addDockWidget ( Qt::DockWidgetArea, QDockWidget *, Qt::Orientation )
dockOptions () const : DockOptions
dockWidgetArea ( QDockWidget * ) const : Qt::DockWidgetArea
.... Etc.. and lots of to access and manage the Doc Widget.
Refer the Qt documentation to understand it better.
Thanks
Prashant Moglaikar
TheClassic
28th July 2011, 16:29
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?
FelixB
28th July 2011, 16:32
try
findChildren<QDockWidget*>
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.