Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.1, 4.6.2
-
None
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).