当前位置:网站首页>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,可以看到结果正常,发布结束。

边栏推荐
- 729. 我的日程安排表 I / 剑指 Offer II 106. 二分图
- Dachang image library
- 2345文件粉碎,文件强力删除工具无捆绑纯净提取版
- Adapter-a technology of adaptive pre training continuous learning
- Compact lidar global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
- Global and Chinese markets hitting traffic doors 2022-2028: Research Report on technology, participants, trends, market size and share
- RDD conversion operator of spark
- 2022 edition illustrated network pdf
- 【coppeliasim】高效传送带
- Easy to use js script
猜你喜欢

Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11](/img/6a/398d9cceecdd9d7c9c4613d8b5ca27.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11

MySQL lethal serial question 1 -- are you familiar with MySQL transactions?

2022.02.13

Use the list component to realize the drop-down list and address list

Keyword static

好用的 JS 脚本

Reset nodejs of the system

PAT甲级 1033 To Fill or Not to Fill

一位博士在华为的22年
随机推荐
729. My schedule I / offer II 106 Bipartite graph
[postgraduate entrance examination English] prepare for 2023, learn list5 words
力扣今日題-729. 我的日程安排錶 I
vs code保存时 出现两次格式化
一个复制也能玩出花来
MySQL winter vacation self-study 2022 11 (9)
Li Kou today's question -729 My schedule I
[untitled] a query SQL execution process in the database
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
Redis delete policy
Sword finger offer 30 Stack containing min function
更改对象属性的方法
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
Paper notes: graph neural network gat
SQL table name is passed as a parameter
【coppeliasim】高效传送带
MySQL winter vacation self-study 2022 11 (8)
零基础自学STM32-野火——GPIO复习篇——使用绝对地址操作GPIO
Shell脚本更新存储过程到数据库
Bigder:34/100 面试感觉挺好的,没有收到录取