PDA

View Full Version : Start application minimized or normal



matze
7th January 2010, 14:45
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?

nikhilqt
7th January 2010, 21:05
QWidget::showMinimized () can solve the problem. put it inside the constructor.

faldzip
7th January 2010, 21:48
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 :]

matze
12th January 2010, 15:57
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.