[Interest] Re : QLineEdit "stretch" in QHBoxLayout using designer

BOUCARD Olivier boucard_olivier at yahoo.fr
Sat Feb 18 00:28:44 CET 2012


Hi Carl,

Try to play with the widget Size Policy, it will become clear.

Olivier.




>________________________________
> De : Carl Schumann <schumann at fnal.gov>
>À : Qt Interest List <interest at qt-project.org> 
>Envoyé le : Vendredi 17 février 2012 21h47
>Objet : [Interest] QLineEdit "stretch" in QHBoxLayout using designer
> 
>Qt community,
>
>I using Qt Designer to layout a very simple GUI via the following steps:
>1. Using the "New Form" dialog I create a "Main Window"
>2. Then a drop a Spin Box and a Line Edit widget onto the main window 
>with the Line Edit to the right of the Spin Box.
>3. Select both and then select Form -> Lay Out Horizontally from the 
>main menu of Designer
>4. Then try out the GUI with Form -> Preview ... from the main menu
>
>The Line Edit has a fixed width that does not respond to resizing the 
>main window or entering long text.   How do I make the Line Edit stretch 
>to use up all the empty space to its right in the main window please?  
>Thanks for any help.
>
>Sincerely,
>Carl Schumann
>
>_______________________________________________
>Interest mailing list
>Interest at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120217/a7ec8bbd/attachment.html>


More information about the Interest mailing list