[PyQt] QDockWidget sizing behavior

John Wiggins jwiggins at enthought.com
Mon Oct 11 16:58:35 BST 2010


On Mon, Oct 11, 2010 at 10:33 AM, Hans-Peter Jansen <hpj at urpla.net> wrote:

> On Monday 11 October 2010, 16:17:21 John Wiggins wrote:
> > Hello,
> >
> > I'm laying out part of the UI for my app using a QMainWindow with no
> > central widget and 4 dock widgets. I'd like the dock widgets to be
> > sized proportionally to each other but they seem to ignore the value
> > returned by sizeHint(). Am I missing something?
>
> Without looking deeper into your code, there's something you should note
> (from the Qt QDockWidget documentation):
>
> Appearance
> [...]
> A QDockWidget acts as a wrapper for its child widget, set with
> setWidget(). Custom size hints, minimum and maximum sizes and size
> policies should be implemented in the child widget.
>
> Hth,
> Pete
>

Hello Pete,

 I've done all those things except setting a maximum size.

Also, I didn't post this useful info before:
python - 2.5.4
qt - 4.5.4
pyqt - 4.6.2

- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101011/fa7ff09c/attachment.html>


More information about the PyQt mailing list