0

我按照此处描述的所有内容设置应用程序图标。

创建 .rc 文件/将其放在 .pro 文件所在的同一目录中。

将以下行添加到 .rc 文件

IDI_ICON1 图标可丢弃“myappico.ico”

将以下行添加到 .pro 文件中

RC_FILE = myapp.rc

运行 QMake 并运行应用程序,出现以下错误消息

:-1: error: error: ..\ZombieAttack\myapp.rc: No such file or directory
:-1: warning: '-x c' after last input file has no effect

我究竟做错了什么?

4

1 回答 1

1

Qt5 中的 qmake 自动为应用程序分配图标。只需将以下内容添加到项目文件中:

win32:RC_ICONS += myappico.ico
于 2014-09-07T07:49:00.400 回答