Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Icon to Action issue in Ubuntu environments
Qt 6.11 is out! See what's new in the release blog

Icon to Action issue in Ubuntu environments

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blueshift
    wrote on last edited by
    #1

    Hello all,
    My system is Ubuntu 12.10 64-bit machine with LXDE, XFCE, Gnome2 and Cinnamon desktop environments.

    I have a basic application with toolbar and right-click context menu. Actions are set from the UI in Action Editor. Those actions are used for toolbar and also in right-click context menu. What I want is some icons on those Actions. I have used QStyle StandardPixmaps

    @action->setIcon(style->standardIcon(QStyle::SP_FileDialogInfoView));@

    To copy to clipboard, switch view to plain text mode
    and also used setIcon() method for my icons.

    The problem I have is when I implement and check in LXDE environment as well as on Windows 7 machine, that icon is displayed both in the toolbar and the right-click context menu. However, the same code in Gnome/XFCE environment, that icon is invisible in the context menu. It displays correctly in the toolbar.

    Is this a problem with the OS or Qt? Help needed seriously.

    Regards,
    blueshift

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Marcos Modenesi
      wrote on last edited by
      #2

      Maybe in Gnome, context menus don't display icons. Some subtle features (separators in menu bars, icon placement) are plattform dependant. Why don't you check if there's an icon in a context menu in any other application for gnome. It would be usefull to compare an app that you know HAS icons in othes styles.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        blueshift
        wrote on last edited by
        #3

        Yep.. you are right. Some environments dont have right-click context menu icon.
        Thanks.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved