[PyQt] QDockWidget sizing behavior
Hans-Peter Jansen
hpj at urpla.net
Mon Oct 11 20:21:25 BST 2010
On Monday 11 October 2010, 17:58:35 John Wiggins wrote:
> 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?
You could try to subclass the QLabels and implement sizeHint for them,
leaving _ViewContainer alone (size wise).. Let us know, if that helps.
Since you have QMainWindows in each of your dock widgets, the outcome is
still hard to predict. You may want to reduce your example to the bare
minimum, e.g. with a single QMainWindow, if the above does not appear
to work.
Pete
More information about the PyQt
mailing list