Results 1 to 2 of 2

Thread: Qt Layout alignment

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt Layout alignment

    Hello I have 3 widgets inside a layout.

    1 on each side (left and right) and one on the center.

    What I would like to achieve is :
    - No matter what is the size of the left widget
    - No matter what is the size of the right widget
    - Keep the center widget on the absolute parent's widget center.

    Any way to do this inside a layout ?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Layout alignment

    Take a look at this ui file. It is saved with Designer 4.3.3.
    You have to add a horizontal spacer after the first widget and before the last widget, and add all of them(3 widgets + 2 spacers) in a horizontal layout.
    Attached Files Attached Files

Similar Threads

  1. changing layout of a widget
    By mikro in forum Qt Programming
    Replies: 10
    Last Post: 4th August 2009, 20:21
  2. Qt Layout engine not respecting minimum size?
    By Mike in forum Qt Programming
    Replies: 2
    Last Post: 28th August 2007, 13:27
  3. Qt layout memory issue
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 25th August 2007, 17:11
  4. Resizing problems when applying a layout
    By JimBrown in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 22:54
  5. "dynamic" layout
    By hulk in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2006, 07:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.