PDA

View Full Version : Resizing dialog with form layout



elizabeth.h1
27th August 2009, 17:11
Hello

I have a dialog in which I have applied form layout as
top level layout.
Here is the structure of the dialog :

label horizontal layout
label lineEdit

in the horizontal layout I have two lineEdits.

When I resize the dialog only the lineEdit which is not in the horizontal layout is streched , and the lineEdits which are in the
horizontal layout are not streched.

I have applied to all my edit boxes size policies equal to (Expanding,Expanding,0,1) .

Lykurg
27th August 2009, 17:28
That's the default behavior of a line edit, because it only shows one line and therefor don't need a vertical expansion. You really should keep that, and reset the default option for the stand alone line edit.

If not use the attached one: line edits inside a widget.

elizabeth.h1
30th August 2009, 20:58
Thank you for the reply, it works this way for me

I saw your example and noticed that the line edits that were originally added to horizontal layout , know are making composite widget like this :



<widget class="QWidget" native="1" name="widget_2" >

<item>
<widget class="QLineEdit" name="lineEdit_2" >
</item>

<item>
<widget class="QLineEdit" name="lineEdit_3" >
</item>

</widget>


How can I do this ,i.e organize my line edits in one composite widget through qt designer,
i.e without manually messing with the .ui file and adding the appropriate code ? Is it possible ? I could not find such a option in designer