Results 1 to 3 of 3

Thread: Resizing dialog with form layout

  1. #1
    Join Date
    Jul 2009

    Default Resizing dialog with form layout


    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) .
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Thanked 1,005 Times in 913 Posts
    Qt products
    Unix/X11 Windows Symbian S60
    Wiki edits

    Default Re: Resizing dialog with form layout

    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.
    Attached Files Attached Files

  3. #3
    Join Date
    Jul 2009

    Default Re: Resizing dialog with form layout

    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 :

    Qt Code:
    1. <widget class="QWidget" native="1" name="widget_2" >
    3. <item>
    4. <widget class="QLineEdit" name="lineEdit_2" >
    5. </item>
    7. <item>
    8. <widget class="QLineEdit" name="lineEdit_3" >
    9. </item>
    11. </widget>
    To copy to clipboard, switch view to plain text mode 

    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

Similar Threads

  1. Resizing Mfc dialog with embeded QWinWidget
    By elizabeth.h1 in forum Qt Programming
    Replies: 1
    Last Post: 22nd August 2009, 22:29
  2. Resizing the dialog boxes
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2007, 11:41
  3. form not auto resizing
    By quickNitin in forum Newbie
    Replies: 5
    Last Post: 7th June 2007, 11:00
  4. Show/hide part of dialog with resizing.
    By Spockmeat in forum Qt Tools
    Replies: 6
    Last Post: 7th June 2006, 09:22
  5. QT4 layout of complex dialog is very slow
    By cboles in forum Qt Programming
    Replies: 15
    Last Post: 28th April 2006, 20:57


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.