Results 1 to 3 of 3

Thread: How to make widget fill entire mainwindow

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    209
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to make widget fill entire mainwindow

    How can I make a Tab widget fill the entire mainwindow, and keep the Tab widget filling the mainwindow regardless of how I resize the mainwindow?
    I design the layout in the designer.
    Last edited by Morea; 28th September 2008 at 10:30.

  2. #2
    Join Date
    Dec 2006
    Location
    San Antonio, TX
    Posts
    9
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make widget fill entire mainwindow

    Morea,

    In designer open the object Inspector dialog and click on centralwidget under the MainWindow. This will load the properties menu for the central widget and from there you can adjust the layout parameters of central widget.

  3. #3
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: How to make widget fill entire mainwindow

    I've got a similar problem to this. If I type code myself I can do this:
    #include <QtGui/QApplication>
    #include <QtGui/QPlainTextEdit>
    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    QPlainTextEdit text;
    text.show();
    return a.exec();
    }
    and I get a text editor that fills my window and resizes with it. I've been trying to do the same thing with the Desiger and the text editor is always a fixed size which doesn't change when I resize the window.
    > In designer open the object Inspector dialog and click on centralwidget under the MainWindow.
    I'm not absolutely sure which thing on the screen is the object Inspector.
    > This will load the properties menu for the central widget and from there you can adjust the layout parameters of central widget.
    I've tried adjusting various properties of this widget and nothing makes any difference. Which property should be adjusted? and what value does it need to be set to.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Replies: 2
    Last Post: 19th August 2008, 09:46
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.