当前位置:网站首页>Qt发布exe软件及修改exe应用程序图标
Qt发布exe软件及修改exe应用程序图标
2022-07-06 02:32:00 【欧特克_Glodon】
1、修改exe应用程序图标
1)准备一个ico图标
需要准备一个ico图标,可以将png图片转换成ico图标,图标大小可以设置成128x128。
可以在图标在线转换网站进行在线转换。转换完毕将xxx.ico图标文件放到与.pro同一个目录下:
2)在.pro文件添加一行代码
RC_ICONS = chess.ico //chess.ico为所需要设置的图标
3)执行qmake(构建–>执行qmake)并运行即可

2、发布exe软件
通常构建成功后,会在项目文件夹中Release文件夹中生成.exe文件,本机运行可以,拷贝到别人电脑会出现各种提示缺失dll的错误,这是由于没有把exe依赖项拷贝过去导致的,而一个个去查找依赖项非常麻烦,所以Qt提供了windeployqt来辅助解决发布问题。
使用windeployqt发布程序
首先将自己的exe拷贝到一个新建的文件夹中:
然后启动自己所用Qt版本的命令行,cd 到自己的文件夹下面:
然后执行windeployqt ChineseChessGame.exe即可:

windeployqt会帮我们解决文件依赖关系,程序需要的库文件都生成在了文件夹中,并且资源文件也被编译到了二进制文件里。
这次再运行ChineseChessGame.exe,可以看到结果正常,发布结束。

边栏推荐
- Black high-end responsive website dream weaving template (adaptive mobile terminal)
- Pat grade a 1033 to fill or not to fill
- Method of changing object properties
- 【coppeliasim】6自由度路径规划
- 更改对象属性的方法
- vs code保存时 出现两次格式化
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
- Minecraft 1.16.5 生化8 模组 2.0版本 故事书+更多枪械
- JS events (add, delete) and delegates
- [untitled] a query SQL execution process in the database
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20](/img/d5/4bce239b522696b5312b1346336b5f.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20

构建库函数的雏形——参照野火的手册
![[Wu Enda machine learning] week5 programming assignment EX4 - neural network learning](/img/37/83953c24ec141667b304f9dac440f1.jpg)
[Wu Enda machine learning] week5 programming assignment EX4 - neural network learning
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16](/img/c3/f3746b161012acc3751b2bd0b8f663.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16

Audio and video engineer YUV and RGB detailed explanation

好用的 JS 脚本

零基础自学STM32-复习篇2——使用结构体封装GPIO寄存器
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22](/img/e0/21367eeaeca10c0a2f2aab3a4fa1fb.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22

【社区人物志】专访马龙伟:轮子不好用,那就自己造!

【MySQL 15】Could not increase number of max_open_files to more than 10000 (request: 65535)
随机推荐
How to check the lock information in gbase 8C database?
Template_ Quick sort_ Double pointer
Formatting occurs twice when vs code is saved
【coppeliasim】6自由度路径规划
GifCam v7.0 极简GIF动画录制工具中文单文件版
Redis installation
Data preparation
Keyword static
Bigder:34/100 面试感觉挺好的,没有收到录取
Minecraft 1.18.1, 1.18.2 module development 22 Sniper rifle
2345文件粉碎,文件强力删除工具无捆绑纯净提取版
【机器人库】 awesome-robotics-libraries
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14
2022 edition illustrated network pdf
3D drawing ()
vs code保存时 出现两次格式化
【coppeliasim】高效传送带
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
Thinking on Architecture Design (under continuous updating)
2022年版图解网络PDF