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?
Printable View
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?
QWidget::showMinimized () can solve the problem. put it inside the constructor.
I would suggest simple solution like command line argument which passed to your app causes minimize launch. Something like this:
starts your app minimized.Quote:
$> app.exe --minimized
Then just add to autostart your app.exe as a command with this --minimized, ofcourse if it is possible :]
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.