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

边栏推荐
- SSM assembly
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 22
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
- Use the list component to realize the drop-down list and address list
- Formatting occurs twice when vs code is saved
- 2022 edition illustrated network pdf
- Template_ Find the reverse pair of permutations_ Sort based on merge
- sql表名作为参数传递
- 有没有sqlcdc监控多张表 再关联后 sink到另外一张表的案例啊?全部在 mysql中操作
- Zero basic self-study STM32 wildfire review of GPIO use absolute address to operate GPIO
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12](/img/b1/926d9b3d7ce9c5104f3e81974eef07.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12

Ue4- how to make a simple TPS role (II) - realize the basic movement of the role

Multi function event recorder of the 5th National Games of the Blue Bridge Cup

Minecraft 1.18.1、1.18.2模组开发 22.狙击枪(Sniper Rifle)
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8](/img/16/33f5623625ba817e6e022b5cb7ff5d.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8

Shell script updates stored procedure to database
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19](/img/7c/f728e88ca36524f92c56213370399b.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16](/img/c3/f3746b161012acc3751b2bd0b8f663.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 16

力扣今日題-729. 我的日程安排錶 I

一位博士在华为的22年
随机推荐
一个复制也能玩出花来
A doctor's 22 years in Huawei
SQL table name is passed as a parameter
Global and Chinese markets of general purpose centrifuges 2022-2028: Research Report on technology, participants, trends, market size and share
数据工程系列精讲(第四讲): Data-centric AI 之样本工程
Use the list component to realize the drop-down list and address list
Shell script updates stored procedure to database
Paper notes: limit multi label learning galaxc (temporarily stored, not finished)
Dachang image library
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
从顶会论文看2022年推荐系统序列建模的趋势
Ue4- how to make a simple TPS role (II) - realize the basic movement of the role
Building the prototype of library functions -- refer to the manual of wildfire
Method of changing object properties
The intelligent material transmission system of the 6th National Games of the Blue Bridge Cup
Blue Bridge Cup group B provincial preliminaries first question 2013 (Gauss Diary)
After changing the GCC version, make[1] appears in the compilation: cc: command not found
更换gcc版本后,编译出现make[1]: cc: Command not found
[coppeliasim] efficient conveyor belt
Audio and video engineer YUV and RGB detailed explanation