Help with Icon on Mainwindow using cmake
-
I have written several applications in the past using older versions of QT but have just recently installed QT 6 and of course have change from qmake to cmake. I am trying to get an icon to appear next to the title on the window header. I have searched diligently trying to find information on how to achieve this but just keep hitting brick walls. If someone could point me in the right direction it would be greatly appreciated!!! Thanks
-
@shathcock Hello, have you looked at this: https://doc.qt.io/qt-5/appicon.html
There is an example for CMake. -
AFAIK you can still use Qt resource files, include your icon there and add the resource to your cmake.
-
Resource system is explained here
This is the App-Icon = "Desktop Icon" = "Icon of your executable". @shathcock was talking about the window icon, I think.