[PyQt] Can DockWidgets be docked onto anything else except MainWindows?

Andreas Pakulat apaku at gmx.de
Thu Feb 2 07:55:44 GMT 2012


On 01.02.12 17:37:53, JPolk wrote:
> 
> Can DockWidgets be docked onto anything else except MainWindows ?
> 
> Supposed you have either a layout or a widget that's "mid-page" in a window
> and want to dock/undock from that layout/widget and not the MainWindow...
> 
> Doesn't look to be possible,...Can anyone confirm this?

You can, but that requires writing a layout-manager similar to the one
used in QMainWindow (which is not public API so cannot simply be used).

So there's no 'out of the box' way to dock QDockWidgets into normal
QWidgets, but if you put in enough effort you can do that.

Andreas



More information about the PyQt mailing list