Results 1 to 4 of 4

Thread: Start application minimized or normal

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    1

    Default Start application minimized or normal

    Hello,
    I would like to start my application minimized, if it's started by autostart (right at the beginning after the user logged in) or normal (in a window), if the user starts the application manually with the exe-file. How can I realize this?

  2. #2
    Join Date
    Jan 2008
    Location
    Bengaluru
    Posts
    144
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Start application minimized or normal

    QWidget::showMinimized () can solve the problem. put it inside the constructor.

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Start application minimized or normal

    I would suggest simple solution like command line argument which passed to your app causes minimize launch. Something like this:
    $> app.exe --minimized
    starts your app minimized.
    Then just add to autostart your app.exe as a command with this --minimized, ofcourse if it is possible :]
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  4. The following user says thank you to faldzip for this useful post:

    matze (12th January 2010)

  5. #4
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    1

    Default Re: Start application minimized or normal

    I used the idea from faltzip and read the cmdlineargs with QCoreApplication::arguments(). So I could use the 1st cmdlinearg as a switch to start the app with show or hide.

Similar Threads

  1. Start application when OS starts
    By sophister in forum Qt Programming
    Replies: 16
    Last Post: 13th April 2011, 06:38
  2. How to start external application from QT?
    By TomASS in forum Newbie
    Replies: 10
    Last Post: 7th November 2009, 17:57
  3. PyQT application start
    By mejustme in forum Newbie
    Replies: 2
    Last Post: 6th June 2008, 18:15
  4. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  5. Start Minimized
    By December in forum Qt Programming
    Replies: 2
    Last Post: 20th October 2007, 07:02

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.