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

QIcon::fromTheme() behaves inconsistently across different Linux desktop environments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.7.3
    • GUI: Look'n'Feel
    • None
    • Ubuntu 10.10 (32 bit), Debian Wheezy (32 bit)

    Description

      In GNOME:

      • Set desired system icon using GNOME Appearance tool.
      • Start Qt application that sets action icon's using QIcon::fromTheme(), e.g:
        ui->action_Open->setIcon(QIcon::fromTheme("document-open"));

      Expected and observed result:

      • Action icons are rendered with icons from theme specified using GNOME Appearance tool.

      In Xfce:

      • Set desired system icon using Xfce Appearance tool
      • Start Qt application that sets action icon's using QIcon::fromTheme(), e.g: as above.

      Expected result:

      • Action icons are rendered with icons from theme specified using Xfce Appearance tool.

      Observed result:

      • Action icons are rendered with icons specified for GNOME.
      • Calling QIcon::themeName() returns the name of the icon theme set in GNOME

      In Openbox, IceWM, Fluxbox:

      • Set desired system icon theme in ~/.gtkrc-2.0
      • Start Qt application that sets action icon's using QIcon::fromTheme(), e.g: as above

      Expected result:

      • Action icons are rendered with icons from theme specified in ~/.gtkrc-2.0

      Observed result:

      • Action icons are rendered without icons
      • Calling QIcon::themeName () returns "hicolor" as the theme, independent of what's specified in ~/.gtkrc-2.0 and what was set for GNOME

      Note that the same behavior is observed in Qt Creator itself (v2.1.0, user install from Nokia download) – namely that it has incorrect or no action icons in DEs that are not GNOME.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            mithat Mithat
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes