[PyQt] Newbie resizing dock widgets question

David Boddie david at boddie.org.uk
Tue Apr 26 21:45:48 BST 2011


On Mon Apr 25 21:50:43 BST 2011, Sarah Mount wrote:

> In designer-qt4 the object inspector, widget box and so on seem to be
> QDockWidgets. I'm making a GUI in Designer that I want to be similarly
> structured. In designer the edge of each QDockWidget can be grabbed
> with the mouse and resized, but in my GUI this isn't possible. I
> *think* I've set all of the dockWidget properties and the widgets can
> be closed and floated, but not resized. Have I misunderstood this? Is
> there some sort of splitter object that needs to be placed between the
> dockWidgets? Or some property set in the layout managers?

Which version of Qt Designer are you using? Did you manually place the
dock widget into a layout?

In older versions of Qt Designer, dropping a dock widget onto a main window
form simply left it floating, unmanaged, unless the central area was
managed by a layout. In newer versions, the dock window is automatically
docked by default - at least, it seems that way.

If you have a dock window embedded in a main window, and you can't move it
when you preview the form, try breaking the layout of the window, selecting
the dock widget, and setting its docked property to true. It should appear
in one of the dock areas around the sides of the window and be handled
separately to the widgets in the main window itself.

David


More information about the PyQt mailing list