Results 1 to 3 of 3

Thread: Start Minimized

  1. #1
    Join Date
    Sep 2006
    Posts
    68
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Start Minimized

    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?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Start Minimized

    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.
    Attached Files Attached Files

  3. The following user says thank you to marcel for this useful post:

    December (20th October 2007)

  4. #3
    Join Date
    Sep 2006
    Posts
    68
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Start Minimized

    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

Similar Threads

  1. How to start a phone call
    By Raccoon29 in forum Qt Programming
    Replies: 13
    Last Post: 17th September 2007, 11:53
  2. Questions about kill() and start() of QProcess
    By mp33919 in forum Qt Programming
    Replies: 5
    Last Post: 23rd June 2007, 14:00
  3. Replies: 2
    Last Post: 27th March 2007, 13:09
  4. QProcess starting minimized
    By moe in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2007, 09:32
  5. I need a help dialog, how do I start?
    By johnny_sparx in forum Newbie
    Replies: 1
    Last Post: 24th May 2006, 00:00

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.