Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QSystemTrayIcon[SOLVED]

    General and Desktop
    2
    3
    1842
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dmitrij last edited by

      Hello.

      The problem occurs after the application is minimized to the system tray: If I close the message box, that app show me, the app will be closed too(I used a QSystemTrayIcon -example from this site). Where can be a problem?

      Thank you for answers beforehand.

      1 Reply Last reply Reply Quote 0
      • B
        broadpeak last edited by

        This is required in main.cpp (after QApplication definition):
        yourApp.setQuitOnLastWindowClosed(false);

        (and your main class must be subclassed this way:
        class YourClass : public QSystemTrayIcon)

        1 Reply Last reply Reply Quote 0
        • D
          dmitrij last edited by

          Thank you for your answer.

          Actually that one "yourApp.setQuitOnLastWindowClosed(false);" was enough.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post