[Interest] Icons on macOS

Mitch Curtis mitch.curtis at qt.io
Mon Oct 8 19:15:42 CEST 2018

I’m trying to add icons to an application on macOS. My Qbs file looks like this:


The generated assetcatalog_generated_info.plist file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

The contents of slate.xcassets:


I don’t see the icon in the dock or anywhere else.

I saw this page:


It says:

“The application icon, typically displayed in the application dock area, is set by calling QWindow::setWindowIcon() on a window.”

However, the app that I’m basing my setup on doesn’t do that. It actually avoids macOS when it sets the window icon and yet still manages to get an icon to show up:


Another thing is that an asset catalog contains many .png files. I was under the impression that the point of it was for the OS to pick the correct image based on the metadata provided in the Contents.json file, so how would I know which size .png to set?

The rest of that page describes icns files, which the documentation explicitly says to avoid (https://developer.apple.com/design/human-interface-guidelines/macos/icons-and-images/app-icon/), so it seems like it might be a bit out-dated.

So, how is this supposed to be done?

More information about the Interest mailing list