Results 1 to 3 of 3

Thread: How to minimize a window to the taskbar

  1. #1

    Default How to minimize a window to the taskbar

    Hello,

    I am working on an application that has a console window for debugging. I want a mechanism to minimize the console window on statup to the taskbar.

    In the past when i did this without QT, I would do something like:
    HWND hwnd = GetConsoleWindow();
    ShowWindow(hwnd, 0);

    What is the best way to do this?

  2. #2
    Join Date
    May 2010
    Posts
    61
    Thanks
    2
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to minimize a window to the taskbar

    Hi mooreaa,

    Are you using a QApplication or just a QCoreApplication to run your app?
    If you are using the first one, then, when creating the main window of the application (QWidget::isWindow) we can show it minimized by using QWidget::showMinimized.

    If you are not using any UI and only QCoreApplication,...then I do not have the answer for you.

    Regards,
    wladek
    One second is long, everything longer than two seconds is definitely too long.

  3. #3

    Default Re: How to minimize a window to the taskbar

    I'm running a QApplication with a console. Ideally I would like to show/hide the console window via a flag or option but for now I'm just trying to keep the window minimized on launch.

    For now I've just set the main app to showMaximized to make it fill up the screen but am still looking for a resolution if anyone has suggestions.

Similar Threads

  1. Replies: 1
    Last Post: 3rd December 2009, 14:08
  2. Hiding a window from the taskbar
    By andyp in forum Qt Programming
    Replies: 1
    Last Post: 16th August 2009, 18:34
  3. Replies: 0
    Last Post: 25th June 2009, 12:41
  4. Minimize other Window
    By johncharlesb in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2007, 16:22
  5. Parentless window with no taskbar entry
    By durbrak in forum Qt Programming
    Replies: 6
    Last Post: 14th December 2006, 13:46

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.