Results 1 to 16 of 16

Thread: Setting fix spacing between Widgets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #12
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,318
    Thanks
    315
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Setting fix spacing between Widgets

    OK, here's a VS2013 project with a dialog laid out as I think you want it. Look at the .ui file, and you will see that everything is inside layouts, as I said in the earlier post. The spacers work correctly and push everything to the left or up as expected. In your .ui code, there are no explicit layouts as children of your centralWidget or group boxes.

    Capture.jpg

    GroupBoxDemo.zip

    Not sure what's happening here - there seems to be two sets of attachments, one pair that is an earlier version (without the border on the frame) of code and screenshot, and the other a newer version (where I added the border to the frame). The only difference is the .ui file. It looks like the inline version (above) is the correct one and the one below in the Attachments box is the older version.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by d_stranz; 30th November 2017 at 00:59.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    Moraxno (30th November 2017)

Similar Threads

  1. Setting width of widgets from QSplitter?
    By adutzu89 in forum Newbie
    Replies: 4
    Last Post: 24th May 2014, 13:07
  2. Replies: 1
    Last Post: 7th February 2014, 14:57
  3. Setting layout margin and spacing globally
    By aarpon in forum Qt Programming
    Replies: 0
    Last Post: 7th April 2009, 12:23
  4. Replies: 3
    Last Post: 27th November 2008, 23:57
  5. Spacing widgets and actions in a toolbar
    By indifference in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2007, 22:59

Tags for this Thread

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.