Results 1 to 6 of 6

Thread: Help about a problem on the tray...

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    107
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Help about a problem on the tray...

    I have an application that when you minimize it it goes to tray.. If you right click on the icon on the tray it show a menu.. See screenshot.



    So when i press the About a QMessageBox is been shown.. See screenshot.



    The problem is that when i press ok or close the QmessageBox the application closes.. I want to go back to the tray.. How can i do this?

    This is what happens when you press About

    Qt Code:
    1. QMessageBox msgBox;
    2. msgBox.setText("<b>This is my <big>Clock</big> application<b>.");
    3. msgBox.setInformativeText("If you like it, visit my <a href=http://www.qtforum.org>webpage</a>!");
    4. msgBox.setWindowTitle("Clock v0.1 by bong.da.city!");
    5. //set the icon of the message box to a custom pixmap of size 64x64
    6. msgBox.setIconPixmap(QIcon(":/new/clock/clock.png").pixmap(QSize(64,64)));
    7. msgBox.setWindowIcon(QIcon(":/new/clock/clock.png"));
    8. msgBox.exec();
    To copy to clipboard, switch view to plain text mode 
    Last edited by Bong.Da.City; 17th August 2010 at 23:41.

Similar Threads

  1. How to keep System tray icons
    By mkkguru in forum Qt Programming
    Replies: 10
    Last Post: 24th February 2010, 16:19
  2. system tray problem
    By vvdounai in forum Qt Programming
    Replies: 5
    Last Post: 14th November 2007, 08:25
  3. Tray Icon
    By vishesh in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 19:10
  4. Tray Ballon
    By eu.x in forum Newbie
    Replies: 5
    Last Post: 28th February 2007, 12:00
  5. QT4/QP Tray Icon
    By incapacitant in forum Newbie
    Replies: 12
    Last Post: 7th June 2006, 18:47

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.