Results 1 to 3 of 3

Thread: Maximizing QWidget to front of desktop

  1. #1
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Maximizing QWidget to front of desktop

    I'm using a QSystemTrayIcon on minimize and then maximize when you double click the icon. This works fine, but if there are any other windows open it invariably shows up behind them. This doesn't feel right. If you maximize a window it should be front and center. Is there any way to bring the widget to the front? I can't seem to find anything in the documentation about this...thanks, Daniel

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Maximizing QWidget to front of desktop

    Try this magic combo:
    Qt Code:
    1. window->showMaximized();
    2. window->activateWindow();
    3. window->raise();
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. The following 2 users say thank you to jpn for this useful post:

    JimDaniel (10th November 2007), tinysoft (17th April 2011)

  4. #3
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Maximizing QWidget to front of desktop

    That did the trick!

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.