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

QSystemTrayIcon:Actions in QSubMenus are not disabled correctly on Mac

    XMLWordPrintable

Details

    • macOS

    Description

      Consider the follow use case :

      1. Application creates a QMenu object and adds some actions to it

      2. Creates a sub-menu and adds actions to it. Adds this sub-menu to the
      menu object create above

      3. Creates a QSystemTrayIcon and assigns it the menu created above

      4. Creates a second menu object and adds actions to it from the first
      menu created in step 1.

      5. Assigns this menu to a button on the UI (context menu).

      6. Adds some extra actions to the first menu (so that these actions now
      show up in the context menu for just the system tray icon)

      If any of the actions are disabled/enabled the effect
      should be seen in both the context menus (for the button and the system tray
      icon), because the actions are shared.

      However, this does not seem to apply to the actions within the sub-menu
      created in 2. For e.g. in the constructor (ConfigDialog::ConfigDialog)
      the last line of code is "m_pSubMenuAction1->setDisabled(true);" This
      is reflected in the context menu for the button in the UI, but the
      system tray icon still shows this action as enabled.

      The problem described above is seen on MAC OS X 10.5.6 (Leopard). The
      interesting thing is this code runs fine on Windows XP (you would see
      the action is disabled in both context menus- the UI button and the
      system tray icon).

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            dettman Dean Dettman (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes