[PyQt] Newbie resizing dock widgets question

Andreas Pakulat apaku at gmx.de
Wed Apr 27 07:27:30 BST 2011


On 27.04.11 00:50:14, Sarah Mount wrote:
> On Wed, Apr 27, 2011 at 00:17, David Boddie <david at boddie.org.uk> wrote:
> > On Wednesday 27 April 2011, Sarah Mount wrote:
> >> On Tue, Apr 26, 2011 at 21:45, David Boddie <david at boddie.org.uk> wrote:
> >> >
> 
> <snip: long docking discussion>
> 
> > The "center widget" or central area in the main window is a normal widget
> > that you can place any other widgets in. This includes dock widgets, but
> > they aren't designed to be used like that. They are supposed to be managed
> > separately by the main window, "outside" the central area. Qt Designer does
> > a reasonable job of letting you configure this, but it is constrained by its
> > widgets-on-a-form approach to UI design.
> >
> > If it turns out that you aren't using all the features of dock widgets in
> > your application, you can design the kind of UI you describe using splitters
> > instead. If you want to do that, just ask and I can give more details.
> >
> 
> Thanks, that diagram made a lot of sense, I've re-worked the GUI with
> splitters, and, like you say, that's much more what I was looking for.
> I didn't realise that splitters could be resized, and I can add some
> actions for closing each pane.

Splitters also allow to close the pane with an easy way to re-open it
later. See the childrenCollapsible property, which defaults to true.

Andreas
 


More information about the PyQt mailing list