Results 1 to 12 of 12

Thread: How to change QMainWindow size at runtime?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2011
    Posts
    19
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to change QMainWindow size at runtime?

    Basically, I'd like to build an app with main window by following steps,

    1. build main window (size was not determined yet at this moment). now, main window only contained toolbar, menu, status bar, without a central widget
    2. then dynamically create the first widget (QFrame-derived), it would be central widget of main window and it would expand main window size according to its size
    3. continue to dynamically create some widgets and add them to central widget.

    Briefly, main window size depends on central widget size.

    Since main window size = all bars size + central widget size,
    so resize() didn't work for my case, it actually resized entire geometry area which contains those bars, but I've no idea about what those bars size are.

    Hopefully I'm clear for you.
    Thanks.
    Last edited by wysota; 6th January 2011 at 11:25.

Similar Threads

  1. QToolbar - change icon at runtime ?
    By pl01 in forum Qt Programming
    Replies: 6
    Last Post: 18th November 2010, 17:51
  2. Change QPixmap image at runtime
    By Qt Coder in forum Qt Programming
    Replies: 12
    Last Post: 30th March 2009, 12:37
  3. Replies: 2
    Last Post: 23rd March 2009, 17:26
  4. how change language at runtime?
    By mattia in forum Newbie
    Replies: 3
    Last Post: 14th November 2007, 18:36
  5. change font size and button size of QMessageBox
    By nass in forum Qt Programming
    Replies: 6
    Last Post: 13th September 2006, 19:16

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.