Results 1 to 2 of 2

Thread: How to get splitter objects to fill the screen when maximized

  1. #1
    Join Date
    Dec 2010
    Posts
    76
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to get splitter objects to fill the screen when maximized

    I was wondering how you can get an application to fill out the main window area when resizing/maximizing? I currently have a tab that contains a QTreeView and a QDialog object. These objects are arranged by a horizontal splitter which I call main splitter. What I would like to know is how to get the QTreeView and QDialog to fill in the extra space when the user maximizes the screen or resizes it to a larger size. I have tried the mainSplitter->addStretchFactor(0, 1) for QTreeView and mainSplitter->addStretchFactor(1,1) for QDialog but that doesn't seem to work .

    Thanks for any help!

  2. #2
    Join Date
    Dec 2010
    Posts
    76
    Thanks
    13
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to get splitter objects to fill the screen when maximized

    Ok so maybe I miss spoke about this or this is an inherit problem with using QSplitter. So as I said before I have a custom class that is a sublcass of QTreeView on the left side of the QSplitter, and I have a custom class that is a sublcass of QDialog on the right side of the QSplitter object. The QSplitter object is then set as the central widget of QMainWindow. The problem arises when the QMainWindow is maximized, neither the QTreeView or QDialog fill in the expanded area. I have tried several different ways of making it work and I seem to be missing something. If anyone has any ideas that would be greatly appreciated. Thanks!

Similar Threads

  1. Replies: 10
    Last Post: 10th January 2011, 21:20
  2. arranging objects in splitter widget
    By bigbill in forum Newbie
    Replies: 2
    Last Post: 13th December 2010, 12:33
  3. Fill Screen with a single colour.
    By TotalNovice in forum Newbie
    Replies: 2
    Last Post: 26th November 2010, 09:54
  4. Frustrated trying to get maximized window.
    By Doug Broadwell in forum Qt Programming
    Replies: 4
    Last Post: 6th February 2009, 06:06
  5. QMainWindow movable while maximized?
    By Byngl in forum Qt Programming
    Replies: 3
    Last Post: 5th June 2007, 19:42

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.