当前位置:网站首页>Qt编译QtXlsx库
Qt编译QtXlsx库
2022-04-23 07:15:00 【欧特_Glodon】
一、QtXlsx库的编译
提供下载包:包含编译好的Qt5.6.3版本、QtXlsx源码以及Perl5软件安装包。
下载地址
1、下载QtXlsx源码
地址:QtXlsxWriter下载地址
下载后解压到自己的磁盘中,路径不要包含空格和特殊字符。
2、安装Perl5
由于编译QtXlsx库需要用到Perl脚本,所以必须确保有这样的执行环境,否则会报错,先cmd进入命令行查看自己是否安装Perl5:
如果没有安装,自行去下载perl5软件进行安装。
3、编译QtXlsx库
用自己安装的Qt打开qtxlsx.pro,然后进行编译即可。
4、使用方法
此处根据编译选择对应的路径:
- 首先将工程文件(路径:QtXlsxWriter-master\src\xlsx)中文件(具体见下面图片)拷贝到新建的QtXlsx文件夹中,最后将QtXlsx文件夹拷贝到Qt的安装目录下,比如我的拷贝到:D:\Qt\Qt5.7.0\5.7\msvc2013_64\include
- 接下来拷贝lib文件夹下Qt5Xlsxd.lib、Qt5Xlsx.lib、Qt5Xlsx.prl、Qt5Xlsxd.prl4个文件到你的Qt的lib下:D:\Qt\Qt5.7.0\5.7\msvc2013_64\lib
- 拷贝lib文件夹下的Qt5Xlsx.dll、Qt5Xlsxd.dll库文件到你的Qt库路径下D:\Qt\Qt5.7.0\5.7\msvc2013_64\bin
- 将构建目录下的mkspecs\modules-inst\qt_lib_xlsx.pri 和qt_lib_xlsx_private.pri到你的Qt模块下D:\Qt\Qt5.7.0\5.7\msvc2013_64\mkspecs\modules
注意:网上有很多说是将mkspecs\modules\qt_lib_xlsx.pri 拷贝到msvc2017\mkspecs\modules,但是这样是结果模块无法加载到项目中,应该是将构建目录下的mkspecs\modules-inst\qt_lib_xlsx.pri 和qt_lib_xlsx_private.pri到msvc2015\mkspecs\modules)
下来就可以使用Qt进行excel的操作了,只是需要注意:
- 使用的时候需要包含头文件#include
- 在.pro需要添加:QT += xlsx
- 完毕之后,最好先qmake再构建工程,否则会提示连接不到库;
之后就可以运行自己的QtXlsx项目了。
版权声明
本文为[欧特_Glodon]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_37251750/article/details/124339715
边栏推荐
- php生成短链接:将数字转成字母,将字母转成数字
- Usage of databinding
- Convert object to URL
- 干货!以点为形:可微分的泊松求解器
- Jetson Xavier NX (3) bazel mediapipe installation
- Anti shake and throttling
- Feign source code analysis
- An article understands variable lifting
- Asynchronous learning
- Principle of sentinel integrating Nacos to update data dynamically
猜你喜欢
[untitled]
一款拥有漂亮外表的Typecho简洁主题_Scarfskin 源码下载
Upload labs range practice
Vowel substring in statistical string of leetcode simple problem
Go语学习笔记 - 数组 | 从零开始Go语言
Ubuntu安装Mysql并查询平均成绩
智能名片小程序名片详情页功能实现关键代码
怎么读书读论文
1216_ MISRA_ C standard learning notes_ Rule requirements for control flow
[appium] encountered the problem of switching the H5 page embedded in the mobile phone during the test
随机推荐
浅谈ES6尾调优化
Thinkphp6 + JWT realizes login verification
Brief description of CPU
Mobile terminal layout (3D conversion, animation)
惨了,搞坏了领导的机密文件,吐血分享备份文件的代码技巧
The following program deletes n consecutive words starting from the ith character from the string str
dried food! Point based: differentiable Poisson solver
Feign source code analysis
每周leetcode - 06 数组专题 7~739~50~offer 62~26~189~9
简述CPU
[problem solving] vs2019 solves the problem that the EXE file generated by compilation cannot be opened
访问数据库的时候出现错误 Operation not allowed for a result set of type ResultSet.TYPE_FORWARD_ONLY.详解
C outputs a two-dimensional array with the following characteristics.
华硕笔记本电脑重装系统后不能读取usb,不能上网
Canvas learning Chapter 1
Talking about distributed storage from ES, mongodb, redis and rocketmq
Implementation of new
vivo,硬件安全的爱与雷霆
网赚APP资源下载类网站源码
巨头押注的全屋智能,正在驱动海信、华为、小米们「自我革命」