Results 1 to 5 of 5

Thread: Frustrated trying to get maximized window.

  1. #1
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Frustrated trying to get maximized window.

    Windows, Qt 4.2.3.

    I've researched through the threads, I've tried to use showFullScreen(), showMaximized(), and setWindowState( windowState() ^ Qt:: WindowFullScreen) - both in my main() and in my QMainWindow() derived object constructor.

    I get a 'Flash' of full screen and then back to the small window. How does one get an application to start up full screen?

    Thanks

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frustrated trying to get maximized window.

    There must be some prob with the code, check again.
    Also might be that some other application is intervening.

  3. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Frustrated trying to get maximized window.

    Hi,

    I had this problem time ago but I don't know what it caused It had to do with my used widgets and their arrangement in layouts. After rearranging in a different layout (with the same appearance) the showMaximized worked.

    So if your layout is not to complicated try to rearrange. May this help, or not


    Lykurg
    Last edited by Lykurg; 5th February 2009 at 18:38. Reason: spelling error

  4. #4
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frustrated trying to get maximized window.

    I found the problem. My code was:

    mw = new QMainWindow;
    sa = new QScrollArea;
    sa->setWidget( mw );
    sa->show();
    mw->showMaximized();


    When I maximized the QScrollArea instead of the QMainWindow all was well with the world; also putting the show() after the showMaximized() resulted in cleaner screen painting.

    mw = new QMainWindow;
    sa = new QScrollArea;
    sa->setWidget( mw );
    sa->showMaximized();
    sa->show();


    Thanks for the help.

  5. #5
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Frustrated trying to get maximized window.

    Why would you want to put QMainWindow inside a QScrollArea
    May be theres some better way

Similar Threads

  1. How to set Qt window transparent?
    By montylee in forum Qt Programming
    Replies: 17
    Last Post: 24th December 2013, 20:11
  2. Resizing a maximized, custom-frame window
    By Claymore in forum Qt Programming
    Replies: 9
    Last Post: 24th November 2010, 18:17
  3. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 12:20
  4. Set a window as child at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2007, 09:30
  5. Change shape of window / animate window
    By sabeesh in forum Qt Programming
    Replies: 3
    Last Post: 31st October 2007, 08: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.