Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70039

System Tray menu doesn't disappear after clicking outside of it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.0
    • Quick: Other
    • None
    • Windows

    Description

      1. Here is an official page with samples https://doc-snapshots.qt.io/qt5-5.9/qml-qt-labs-platform-systemtrayicon.html 
      2. I take this code for testing:
        SystemTrayIcon {
            visible: true
            iconSource: "qrc:/images/tray-icon.png"
        
            menu: Menu {
                MenuItem {
                    text: qsTr("Quit")
                    onTriggered: Qt.quit()
                }
            }
        } 
        

         

      3. Build and run appliation
      4. Click on system tray icon (tray menu should be shown)
      5. Click outside the system tray menu

      Expected result: system tray menu for my application closed automatically

      Actual result: system tray menu still visible until one of the items from it will be clicked or system tray icon will be clicked again. 

       

      P.S.: it works on macOS (see attached video)

      QmlSystemTray.mov

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            w00t Robin Burchell
            skident Volodymyr Bahrii
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes