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

Qt::AA_DontShowIconsInMenus should defer to the style

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 5.4.0 Alpha
    • 4.8.0
    • GUI: Look'n'Feel
    • None
    • GNOME/X11

    Description

      In GNOME/X11 environments, there's a hardcoded check in QApplication for a specific GNOME config setting ("/desktop/gnome/interface/menus_have_icons") during initialization. If this setting is disabled, the Qt::AA_DontShowIconsInMenus attribute is set, globally disabling icons in menus (by default).

      Although applications that want to blend in with a GNOME desktop environment want to match the user's preference, those with highly customized styles may require more specific behavior. In our case, important icons simply disappeared when we upgraded to a newer desktop environment that had a different default value for this GNOME setting.

      The workaround is simple: force the Qt::AA_DontShowIconsInMenus attribute to true after initializing the application.

      But really, it seems wrong for this to be a global attribute in the first place; this should be driven by the style, like virtually every other aspect of a menu's visual appearance.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmk@pixar.com Jason Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: