Results 1 to 5 of 5

Thread: Widget proportions in QSplitter

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Question Widget proportions in QSplitter

    Hello,

    I am having some problems with the widgets proportions in different QSplitter.

    I have 3 Qsplitter and four widgets of different classes (QTreeWidget, QFrame, QTableWidget and QWidget). I create the whole structure in QtDesigner having the design and hierarchy shown in pictures 1 & 2.

    The problems arrive when I want to set the widgets size before the window is shown. I have the following lines in order to try and have the figure shown in picture 3, 1/3 of the space for the first widget and 2/3 for the second one in each splitter.

    Qt Code:
    1. ui->treeSplitter->setStretchFactor(0, 1);
    2. ui->treeSplitter->setStretchFactor(1, 2);
    3.  
    4. ui->logSplitter->setStretchFactor(0, 1);
    5. ui->logSplitter->setStretchFactor(1, 2);
    6.  
    7. ui->tableSplitter->setStretchFactor(0, 1);
    8. ui->tableSplitter->setStretchFactor(1, 2);
    To copy to clipboard, switch view to plain text mode 


    Is there something I am missing? Could you point me out where the problem could be?

    Thanks in advance.

    1.png2.png3.jpg
    Last edited by godi; 28th September 2011 at 08:27.

Similar Threads

  1. QSplitter ignores some widget methods
    By lotek in forum Qt Programming
    Replies: 0
    Last Post: 13th October 2010, 20:29
  2. Size proportions of widgets in QSplitter
    By Boron in forum Qt Programming
    Replies: 2
    Last Post: 9th October 2009, 18:25
  3. Bug in QSplitter with Qt4.5.1
    By araglin in forum Qt Programming
    Replies: 1
    Last Post: 28th April 2009, 07:45
  4. QSplitter
    By weixj2003ld in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2009, 13:46
  5. New to QSplitter
    By bruccutler in forum Qt Programming
    Replies: 6
    Last Post: 6th September 2007, 16:43

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.