Results 1 to 5 of 5

Thread: making qmainwindow dynamically resizable to fit to screen

  1. #1
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default making qmainwindow dynamically resizable to fit to screen

    Hi All,

    Is there any way by which we can make the qmainwindow dynamically resizable in order to fit to screen??
    Alongwith window the widgets on the window should also dynamically be resized.

    Thanks in advance...

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: making qmainwindow dynamically resizable to fit to screen

    erm, have you tried using a layout manager such as the horizontal, vertical or grid layouts?

  3. #3
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: making qmainwindow dynamically resizable to fit to screen

    Yes I had But Its not working ...

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: making qmainwindow dynamically resizable to fit to screen

    In order to fit your top most widget to the screen size you can use QDesktopWidget for the screen size and resize your top widget based on that.
    For the widgets inside your widget use layouts.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Sep 2009
    Location
    Nanjing, China
    Posts
    46
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: making qmainwindow dynamically resizable to fit to screen

    What does "fit to screen" means? Could you use QMainWindow's showMaximized function? It can show main window maximum.

Similar Threads

  1. Making QgraphisProxyWidget resizable on MAC.
    By kaushal_gaurav in forum Qt Programming
    Replies: 5
    Last Post: 20th April 2009, 11:04
  2. making an application window non resizable
    By aegis in forum Qt Programming
    Replies: 16
    Last Post: 13th May 2007, 19:14
  3. Open a QMainWindow in full screen mode?
    By probine in forum Qt Programming
    Replies: 7
    Last Post: 29th November 2006, 13:44
  4. Dynamically Loading a QMainWindow?
    By natron in forum Newbie
    Replies: 10
    Last Post: 21st July 2006, 01: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.