Qt 5.02 - How to add a MacOS Dock Icon?
I am trying to put in MacOS icon for the Dock, I added ICON = resources/images/mac/highres.icns but I get this error --> :-1: error: No rule to make target `../cworklog-qt-client/resources/images/mac/highres.icns', needed by `cworklog.app/Contents/Resources/highres.icns'. Stop.
Re: Qt 5.02 - How to add a MacOS Dock Icon?
Re: Qt 5.02 - How to add a MacOS Dock Icon?
Yes, I went to Build -> Run qmake and it still didn't change the icon
Here is my icon in the resources.qrc
://images/mac/highres.icns
In two of the constructors I tried
Code:
#ifdef Q_OS_MAC
this
->setWindowIcon
(QIcon("://images/mac/highres.icns"));
#endif
Both didn't work???
I also added the below snippet to my .pro file
Code:
macx {
ICON = images/mac/highres.icns
}
I reran qmake again but still no icon
I also took out the macx{ } parenthesis and ran qmake but to no avail
What else do I do? Someone please help me.
Re: Qt 5.02 - How to add a MacOS Dock Icon?
Is this a Qt 5.02 bug?
Here is my makefile
https://pastee.org/kpdzr
Re: Qt 5.02 - How to add a MacOS Dock Icon?
Seems straightforward enough in the docs.
Which icon is not appearing? The dock icon during application launch, or the icon after the application has launched?
What warnings are being issued during the build, especially during the qrc run?
Why "://images/mac/highres.icns" and not ":/images/mac/highres.icns"? Is this the issue?
Re: Qt 5.02 - How to add a MacOS Dock Icon?
Ok, I feel so stupid, there is a reason I posted this in the newbie forum.
The whole time I was compiling under "debug" mode
When I changed to "release" mode it worked fine
great looking icon
Thanks for all your help and no need for this->setWindowIcon(QIcon(":/images/mac/highres.icns"));
To answer your question i was just trying out stuff
Jim