当前位置:网站首页>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,可以看到结果正常,发布结束。
边栏推荐
- Data preparation
- Dachang image library
- GifCam v7.0 极简GIF动画录制工具中文单文件版
- High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
- Httprunnermanager installation (III) - configuring myql Database & initialization data under Linux
- inherited constructors
- Advanced technology management - what is the physical, mental and mental strength of managers
- SQL table name is passed as a parameter
- How to generate rich text online
- Global and Chinese markets of general purpose centrifuges 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
数据工程系列精讲(第四讲): Data-centric AI 之样本工程
米家、涂鸦、Hilink、智汀等生态哪家强?5大主流智能品牌分析
Redis delete policy
The third level of C language punch in
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 9
[Wu Enda machine learning] week5 programming assignment EX4 - neural network learning
Adapter-a technology of adaptive pre training continuous learning
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
HttpRunnerManager安装(三)-Linux下配置myql数据库&初始化数据
随机推荐
我把驱动换成了5.1.35,但是还是一样的错误,我现在是能连成功,但是我每做一次sql操作都会报这个
2022年版图解网络PDF
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
[untitled] a query SQL execution process in the database
Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
爬虫(9) - Scrapy框架(1) | Scrapy 异步网络爬虫框架
模板_快速排序_双指针
[eight part essay] what is the difference between unrepeatable reading and unreal reading?
构建库函数的雏形——参照野火的手册
Follow the mouse's angle and keyboard events
High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
Use Scrollview and tabhost to realize vertical scrollbars and tabs
A doctor's 22 years in Huawei
The third level of C language punch in
Shell脚本更新存储过程到数据库
RDD creation method of spark
Black high-end responsive website dream weaving template (adaptive mobile terminal)
MySQL winter vacation self-study 2022 11 (6)
Thinking on Architecture Design (under continuous updating)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7