View Full Version : create dock widget from some other widget

16th December 2011, 14:43
I create a dockwidget from some other widget, and it seems to work, but it can not be docked to a main window afterwards. And I can not call addDockWidget simply because there is no way to get a pointer to application's main window in qt4. What is the proper way to accomplish that?

16th December 2011, 16:22
why don't you know the mainwindow instance??? If you want to add a dock widget, you shoul dbe making the widget at the same time as the mainwindow in most normal circumstances.