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. Application icon for linux

Application icon for linux

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 9.5k Views
  • 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.
  • P Offline
    P Offline
    piciji
    wrote on last edited by
    #1

    Using setWindowIcon works for windows and mac, but not for linux. In ubuntu I only get a question mark icon in the left panel. I am using Ubuntu 12.04. I think Unity is the default gui. I have seen other executables which generate a nice icon in the left panel but have default icon in file explorer.

    application
    setWindowIcon (all os ? )

    pro file:
    rc file (win)
    icns (mac)
    in linux it's not that easy (the icon, displayed in file explorer is not part of the executable ?)

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      I think it is adequately covered in the documentation under "Setting the Application Icon":http://qt-project.org/doc/qt-4.8/appicon.html and referenced "standards." The only part lacking is suggested location for the desktop files:

      • Per-user location for the desktop file is typically ".local/share/applications"
      • System wide "/usr/share/applications/".

      Your assessment is correct. The desktop icon on Linux is not part of the executable. It isn't for OS X either, it's just that the mechanism is standard so installing the separate file into the application bundle is easily automated. On Linux your installer (or application on first start) needs to take care of this based on the environment presented to it.

      On all platforms the desktop icon has no direct relationship to the application window icon. QApplication::setWindowIcon() works on all three desktop platforms.

      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