Results 1 to 3 of 3

Thread: Minimize application on launch ..?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Minimize application on launch ..?

    Is this possible? I mean, to minimize the app in launch?
    I have added an tray icon from which you can access the app from there, but, the worj of my app is "background work", so, some users may want to be minimized right away and send it to tray (this will be done automatically with the change event, don't worry about this, I've fixed it). So, is there any way to minimize an application on launch, just editing its constructor?

  2. #2
    Join Date
    Jun 2010
    Posts
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Minimize application on launch ..?

    QMainWindow is derived from QWidget, therefore this should work:

    void QWidget::showMinimized () [slot]

    Shows the widget minimized, as an icon.
    Calling this function only affects windows.

    See also showNormal(), showMaximized(), show(), hide(), isVisible(), and isMinimized().

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

    hakermania (2nd September 2010)

  4. #3
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Minimize application on launch ..?

    Thank you. The solution is:
    Qt::QueuedConnection; MainWindow::showMinimized(); MainWindow::hide();

Similar Threads

  1. application fails to launch
    By freekill in forum Qt Programming
    Replies: 12
    Last Post: 7th March 2011, 15:14
  2. How to start an action at application launch ?
    By fassage in forum Qt Programming
    Replies: 3
    Last Post: 3rd November 2009, 13:11
  3. I cannot launch my app!
    By MIH1406 in forum Qt Tools
    Replies: 9
    Last Post: 26th October 2009, 11:53
  4. How to launch an application automatically ?
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 16th January 2009, 15:26
  5. Application crashes at launch-time
    By Salazaar in forum Newbie
    Replies: 70
    Last Post: 22nd June 2007, 01:11

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
  •  
Qt is a trademark of The Qt Company.