type
status
date
slug
summary
tags
category
icon
password
Property
Jun 27, 2023 06:32 AM
测试环境:Qt Creator8.0+CMake,配置文件为CMakeList.txt
任务栏及进程图标设置
1.通过QT创建logo.qrc资源文件,并将logo.ico图片文件添加到qrc资源中
2.cmake中CMakeLists.txt中add_executable命令后包含logo.qrc文件,如
3.ui文件中通过windowICON属性设置资源文件中的图标

桌面图标设置
1.项目源代码根目录,即和cmakelists.txt同级目录下创建logo.rc文件,内容如下
2.cmake中CMakeLists.txt中add_executable命令后包含logo.rc文件,如
3.重新编译项目,图标生效