PDA

View Full Version : Start Minimized



December
20th October 2007, 04:11
I am trying to figure out how to have a program start minimized.

I am using a QSystemTrayIcon, and some users have suggested that there is no point in showing the main window. I have tried everything I can think of in the initializer (like this->hide(), this->setVisible(false) etc) but nothing seems to work. I event tried over-riding the onShow event, but then just ended up with the main window showing and no widgets on it.

Any ideas?

marcel
20th October 2007, 06:36
I don't know what approach you chose, but I modified the systray example a bit (1 line actually), and it works. It starts minimized.
The code is attached.

December
20th October 2007, 07:02
Hey thanks for that. I was trying to do in in my program.cpp, when I should have been doing it form main.cpp.

Works great :)