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

macOS: QSystemTrayIcon::activated signal slot is called multiple times if QSystemTrayIcon::setContextMenu is called from it

    XMLWordPrintable

Details

    • macOS
    • 5b451efe8 (dev), 038a20998 (6.6), ddc9dbd26 (tqtc/lts-6.5)

    Description

      Good afternoon.
      If you call set menu (via the QSystemTrayIcon::setContextMenu method) in a slot that is connected to the QSystemTrayIcon::activated signal, then with subsequent clicks on the tray menu icon, this slot will be called several times, and with each click the number of calls doubles.

      This behavior may cause the application to freeze when clicking multiple times.

      I am attaching a video demonstrating this behavior and the source code of a minimal project for reproduction.

      Attachments

        1. TrayIconTestMacBug.mov
          8.60 MB
        2. TrayIconTestMacBug.mp4
          9.24 MB
        3. TrayIconTestMacBug.zip
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            rumgot rumgot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes