I want to set the application's icon that should be seen on the Dock of a Mac. To do so, I added to the .pro file the following line:
ICON = $$_PRO_FILE_PWD_/Icons/Icon144x144.icns
(I also tried ICON = Icons/Icon144x144.icns
)
If I understood Qt's documentation right, that should be enough but since my icon still can not be seen, I also added the following line to the mainwindow.cpp
setWindowIcon(QIcon("Icons/Icon144x144.icns"));
(I also tried with QIcon("Icon144x144.icns")
and QIcon("/Users/MYNAME/PROJECT/Icons/Icon144x144.icns")
).
I know that there are two similar questions about this issue: QT/C++ on MAC - Application Icon doesn't set and Setting icon on a Mac with Qt but since I'm still not able to see the right icon, I'm thinking if there is something different in the way that Qt5 allows setting the app icon from previous versions. Any clue?
EDIT:
I just saw that qmake is not adding the icon to the Resources folder inside the app...