Unsolved Set app icon using qmake (Both mac and Win)
-
I am following this qt documentation to set my application icons for mac and Win.
https://doc.qt.io/qt-5/appicon.htmlIn my *.pro file I have
win32: { RC_ICONS = my.ico ...
This option is not recognized at all and stays "black colored" ...
macx { ICON = my.icns ....
This throughs an error at compile time:
error: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.Can somebody lead me to working examples pls.
-
@ademmler This both looks perfectly fine and is the same way we are doing it. You are right that for
RC_ICONS
there seems to be no highlighting. It is black in our project file as well, but it works. On MacOS it seems that it cannot find the icons. Do you have an icon with this name? Especially a Mac icon with the ending.icns
? Furthermore, if the icon is located inside a subfolder, you have to specify the relative path to it (relative to the project file). This is true for both Windows and Mac. -
win32: {
RC_ICONS = my.ico
...
This option is not recognized at all and stays "black colored" ...remove the : behind the win32, remove the space before the {
qmake is kind of fragile to these kind of thingserror: No rule to make target spicon.icns, needed by My.app/Contents/Resources/spicon.icns'. Stop.
the error message doesn't fit to your code posted:
my.icns != spicon.icns