Analog of Java Form Layout in Qt

Once I have programmed GUI with Java and have used Form Layouts. Form layout (if I am not mistaken that is from SWT library) made possible to give right, left, top and bottom adges of any GUI element (widget) with respect to other widgets in the same widget (parent widget) or with respect to the adges of parent widget. So it was possible to control the future of widgets that are inside of another one, when that "another widget" is being resized.

In Qt I have find the QFormLayout which is similar to Java one, but seems I can't handle with widgets as flexible in terms of relative positioning, as it was with Java's Form Layout.

So are there any other means to give a widget position with respect to the others (without overloading resizeEvent function) as that was in Java?



It's hard to understand what you need exactly, but Qt has a plethora of layout options. QFormLayout, it so happens, is not what you need here (it's meant for forms in the web-sense: labels with text input boxes).

But QBoxLayout (and its subclasses) and QGridLayout probably are what you need. I was always able to satisfy all my layout needs in Qt with combinations of these. See some examples of their usage in the Qt demo and I'm sure you'll have your problem solved.

Need Your Help

How to disable lazyload in subsonic programmatically?

subsonic lazy-loading

By default if the table has FK, subsonic also retrieves data of the FK table.

Python Bottle framework becoming non-responsive

python web-services python-2.7

I am having some problem with using python's Bottle framework( to host a webpage. It seems to work fine for certain period of time but now and then I get the