1 Attachment(s)
Positioning of QFormLayout
Hello,
I have built a little QT-based application but I have a difficulty to correclty position a QFormLayout.
As it can be seen in the attached file, I have a QBoxLayout containing a form, a QFrame (separator line) and a graphic. I would like the QFormLayout to adjust in order to let as space as possible to the graphic but I did not succeed. Do you have any idea ? Thanks by advance !
Attachment 9492
For information, I have used without success :
Code:
setSizeConstraint
(QLayout::SetMinimumSize) on the QFormLayout
setSizeConstraint
(QLayout::SetMaximumSize) on the graphic
setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint) on the QFromLayout
Re: Positioning of QFormLayout
Set minimum size policy on form, maximum size policy on graphics
(or)
While adding the widgets to the QVBoxLayout set the stretch as form=1, frame=1, graphic=2
[SOLVED] Positioning of QFormLayout
Thanks a lot for your answer, the second solution works fine !
Quote:
Set minimum size policy on form, maximum size policy on graphics
For my information, I know how to set sizepolicy to the graphic since it is a widget but I do not know how to do it on the form (it is a layout). I have found setsizeconstraint but not setsizepolicy or equivalent on a layout. Could you help me by giving the function or a reference to this function ?
Re: Positioning of QFormLayout
For layouts use setsizeconstraint
[SOLVED] Positioning of QFormLayout