QT设置应用程序

在设置应用程序图片时,遇到了问题::-1: error: [release/HelloWorldRelease_resource_res.o] Error 1.

错误原因:直接建立了个文件,改名为.ico,之后将图片添加在.ico中。这样会导致编译错误。

成功操作如下:

第一步:可以将已选择好的图片,直接在线生成.ico格式。 在线生成链接:http://ico.duduxuexi.com

第二部:将生成好的图片更改文件名字(为了好管理), myappico.ico。

Store the ICO file in your application's source code directory, for example, with the name myappico.ico.

Then, assuming you are using qmake to generate your makefiles, you only need to add a single line to your .pro project file:

第三部:在你的makefile中更改,也就是需要在你的工程中双击你的.pro文件,在最后一行添加:

  RC_ICONS = myappico.ico

扫描二维码关注公众号,回复: 9528080 查看本文章

猜你喜欢

转载自www.cnblogs.com/qq376142178/p/12395112.html