[PyQt] Newbie resizing dock widgets question
Andreas Pakulat
apaku at gmx.de
Wed Apr 27 00:10:59 BST 2011
On 26.04.11 23:45:58, Sarah Mount wrote:
> However, I have three QDockWidgets, one that is intended to stretch
> over the bottom of the main window, and the other two above it side by
> side, like this:
>
> [][]
> [ ]
>
> I've set all of the sizePolicy properties to Expanding; the lower
> dockWidget expands correctly both horizontally and vertically. The top
> two widgets will expand vertically but leave a large gap in the centre
> of the main window when resizing the main window horizontally. This
> worked just fine when I was applying a grid layout to the
> centralWidget. Any ideas? It all seems a bit counter-intuitive to me!
Sounds like you're using the wrong tool for the job. dock widgets are
supposed to be moveable around the 4 areas above, below and next to the
central area. The intent is to have a central widget or widgets and the
dock-areas contain helper tools for working on the central widget. If
all you want is one widget stretched alongside the bottom and two above
that share the space, then use normal widgets and a grid-layout for
that.
Andreas
More information about the PyQt
mailing list