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

边栏推荐
- Keyword static
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
- LeetCode 103. Binary tree zigzag level order transverse - Binary Tree Series Question 5
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22
- Paper notes: limit multi label learning galaxc (temporarily stored, not finished)
- [coppeliasim] 6-DOF path planning
- 更改对象属性的方法
- 更换gcc版本后,编译出现make[1]: cc: Command not found
- Déduisez la question d'aujourd'hui - 729. Mon emploi du temps I
- 继承的构造函数
猜你喜欢

Déduisez la question d'aujourd'hui - 729. Mon emploi du temps I

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower

零基础自学STM32-野火——GPIO复习篇——使用绝对地址操作GPIO

【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22](/img/e0/21367eeaeca10c0a2f2aab3a4fa1fb.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22

3D drawing ()

Spark accumulator

力扣今日题-729. 我的日程安排表 I
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14](/img/c5/dde92f887e8e73d7db869fcddc107f.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14

Zero basic self-study STM32 wildfire review of GPIO use absolute address to operate GPIO
随机推荐
Paper notes: graph neural network gat
2022.02.13
After changing the GCC version, make[1] appears in the compilation: cc: command not found
Prepare for the autumn face-to-face test questions
构建库函数的雏形——参照野火的手册
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14
General process of machine learning training and parameter optimization (discussion)
Template_ Quick sort_ Double pointer
MySQL lethal serial question 1 -- are you familiar with MySQL transactions?
剑指 Offer 30. 包含min函数的栈
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
HttpRunnerManager安装(三)-Linux下配置myql数据库&初始化数据
好用的 JS 脚本
Adapter-a technology of adaptive pre training continuous learning
HDU_ p1237_ Simple calculator_ stack
I changed the driver to 5.1.35, but it is still the same error. I can succeed even now, but I will report this every time I do an SQL operation
Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
Use the list component to realize the drop-down list and address list