Results 1 to 1 of 1

Thread: [SOLVED] Re: QSplitter Sizes

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default [SOLVED] Re: QSplitter Sizes

    I am using Qt 4.8.5 and have a question with QSplitter. I currently have a QGroupBox containing some items on the left side of a QSplitter, and on the right side are two group boxes stacked vertically with a QSplitter in between them. The default behavior for the QSplitter is to distribute the widgets on each side in a 50/50 split. However, I would like the left side to get about 25% of the space and the right side to get the rest. I have messed with changing the SizePolicy of the QSplitters and other widgets but see no change in behavior. The only thing I can do is set MaximumSize for the left side, but this ultimately defeats the purpose of using the QSplitter. Any ideas on how to get the initial sizings?


    Added after 14 minutes:


    Nevermind, just found looking deeper into the documentation, QSplitter does have a setStretchFactor function that can handle this for me. I am surprised this is not editable in Designer like Layouts are.
    Last edited by ToddAtWSU; 1st September 2015 at 16:16. Reason: Solved

Similar Threads

  1. QSplitter, sizes() is empty (0,0) but contains widgets
    By HappyCoder in forum Qt Programming
    Replies: 4
    Last Post: 23rd July 2015, 16:56
  2. Sizes for different OS and devices
    By KeineAhnung in forum Newbie
    Replies: 0
    Last Post: 21st November 2014, 07:48
  3. Toolbutton odd sizes
    By andytork in forum Qt Programming
    Replies: 0
    Last Post: 21st January 2009, 06:25
  4. Font sizes
    By StevenB in forum Qt Programming
    Replies: 1
    Last Post: 5th October 2007, 10:10
  5. How to set Widgets sizes with in QSplitter
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 07:38

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.