tags:

views:

56

answers:

1

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?

Thanks.

+1  A: 

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.

Eli Bendersky
Seems just you are not familar with SWT form layouts :). I want to know is there is any analog class of that one.
Narek
He answered that there is no such layout.
Kamil Klimek
Yes, it is satisfactory! Oly need to be set also size policy, to be able to handle layout completly! Thanks!
Narek