Qt-interest Archive, January 2002
Layout of custom widgets in uic code
Message 1 in thread
I have been trying to use custom widgets in Qt Designer. It all works
fine except for the fact that all sublayouts of a widget are instead made
to be sublayouts of a 'privateLayoutWidget' by designer. When you resize
the widget, this private layout widget (and hence all the sublayouts)
doesn't get resized along with it.
If I were writing this by hand, all instances of privateLayoutWidget would
be replaced with 'this', and if you do that (search and replace the
generated .cpp -- actually, the .py, but I checked that uic generates
equivalent code to pyuic from PyQt), it works as expected -- when you
resize the widget, everything inside it resizes appropriately.
What should I be doing to either a) get privateLayoutWidget to resize
along with the widget, or b) stop privateLayoutWidget existing in the
first place?
Thanks for any help
John
Message 2 in thread
"John J. Lee" schrieb:
>
> I have been trying to use custom widgets in Qt Designer. It all works
> fine except for the fact that all sublayouts of a widget are instead made
> to be sublayouts of a 'privateLayoutWidget' by designer. When you resize
> the widget, this private layout widget (and hence all the sublayouts)
> doesn't get resized along with it.
If you select the widgets in Designer and click on the button that
creates a layout for them, this will also create the layoutWidget. If
instead you *de*select everything (i.e., select the underlying window)
and click that button, it will create a layout with this window as
parent.
Hope this helps,
Arne
Message 3 in thread
On Tue, 15 Jan 2002, Arne Heizmann wrote:
> "John J. Lee" schrieb:
[...]
> If you select the widgets in Designer and click on the button that
> creates a layout for them, this will also create the layoutWidget. If
> instead you *de*select everything (i.e., select the underlying window)
> and click that button, it will create a layout with this window as
> parent.
Oops. Thanks.
John