Attached is a patch to make UIC use GridBagLayout
instead of NaturalLayout.
I discovered that UIC does not seem to honor
QSizePolicy settings in Designer. Furthermore, I
could discover no way to force NaturalLayout to use
size policy decisions I had made, rather than make
its own decisions (which were often incorrect for the
GUI I was designing).
By switching to GridBagLayout, I give up accuracy in
margin widths/heights--a fairly small detail--in
favor of a layout with finer control that more
closely respects the layout decisions made by the
developer in Qt Designer.
NOTE: I realize this patch is a pretty hackish and
likely-incorrect solution. We are using UIC at work
on a specific project, and I wrote it primarily to
support that. As such, it's probably not acceptable
for inclusion into mainline UIC as it currently
stands.
However, it works quite well for us. I thought I
should throw it out there in case the UIC
developers--or others with a similar problem--find it
useful.
use-gridbag-layout.patch
Logged In: YES
user_id=591909
Originator: NO
I would really like to make UIC use a new grouplayout. (java 6). I think this layout is really usable when it comes to functionality like making buttons the same size, using units (like jgoodies form layout does) etc.
All in all it is a really readable layouter as well. Please let me know what you think (sorry for the really late reply though)