Important: Please read the Qt Code of Conduct -

Application Icon not shown in Mac OS X Dock

  • My applicaiton is developed with Qt 4.8 and we have set the application title and icon with the statements like
    The application icon is correctly shown in the title bar, but not in Dock. Instead a dark gray icon (overlaid with four chars "exec") is shown in Dock. So how can I make application icon shown in Dock? Thanks.

  • Lifetime Qt Champion


    The procedure is described "here": (it's also valid for Qt 4)

  • Thank you for your help SGaist.
    As I use CMake to manage the project files, I modify the CMakeLists.txt file accordingly. The added piece of CMakeLists.txt is:

    Next I run CMake to regenerate project files (.xcodeproj) and build the project. After the build, the folder is created under Debug folder as expected.
    Then I manually create Resources folder under Contents folder and copy myapp.icns into this folder.
    However, when I run the program, the icon shown in Dock is still a generic icon, not myapp.icns. This time it changes from the dark-gray-background-with-exec-chars to white-background-with-xcode-symbols (pen, ruler) icon.

    [edit: added missing coding tags @ SGaist]

  • Lifetime Qt Champion

    I've merged the two threads, the posting bug appears from time to time

  • Lifetime Qt Champion

  • @SGaist Tried the procedure mentioned in the link, when application is Run, my app.icns is copied in the Resources file of the but it is not linked to the icon in the info file, tried manually but still it won't work.

  • Try the following:

    In your pro file:

     QMAKE_INFO_PLIST   =	Mac/Info.plist
     ICON        =   Mac/AppIcon.icns

    In my case, the info.plist and icon files are in a folder called 'Mac' inside my project folder.

    In the info.plist file, you must have:


Log in to reply