Results 1 to 3 of 3

Thread: Layout and stretch factor

  1. #1
    Join Date
    Nov 2011
    Posts
    79
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Layout and stretch factor

    I'm trying to create a simple window with layouts in Qt Designer
    that's what I would like to get
    window.jpg
    *.ui file in attacment

    2 widgets aligned vertically with QSplitter
    top widget is 2 QWidgets aligned with QSplitter and bottom widget is QTabWidget
    top widget have stretch factor 10 and bottom one have stretch factor 1


    and this is what I really get
    window2.jpg


    what I do wrong?
    why stretch factor is not taken into account and how to arrange the widgets so that the bottom one occupied the smaller part of the form?
    Attached Files Attached Files
    Last edited by folibis; 26th April 2012 at 06:52.

  2. #2
    Join Date
    Jul 2010
    Location
    Indonesia
    Posts
    83
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Layout and stretch factor

    Try this. Change splitter stretch factor to 1, and tabWidget stretch factor to 0, then set the minimum size of one of the tab in your tab widget (changing the minimum size of tabWidget will not ) to adjust the tab size.
    I now this is not the answer, but hope this helps a little.
    ~ We are nothing in this universe ~

  3. #3
    Join Date
    Nov 2011
    Posts
    79
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Layout and stretch factor

    Yes, it works. Not as expected, but works. Thanks viulskiez!

Similar Threads

  1. Replies: 3
    Last Post: 2nd February 2009, 23:40
  2. Replies: 4
    Last Post: 20th November 2007, 20:47
  3. TextEdit won't resize when Stretch factor set to 0
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2007, 17:51
  4. Drawing on QWidget - strech & resize
    By kemp in forum Qt Programming
    Replies: 5
    Last Post: 22nd January 2007, 14:39
  5. QScrollArea - content strech,scale
    By kemp in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 18:15

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.