当前位置:网站首页>qt使用QZxing生成二维码
qt使用QZxing生成二维码
2022-07-03 15:15:00 【Happinessคิดถึง】
**
更新时间:2022-06-21
**
二维码又称二维条码,常见的二维码为QR Code,QR全称Quick Response,是一个近几年来移动设备上超流行的一种编码方式,它比传统的Bar Code条形码能存更多的信息,也能表示更多的数据类型。
二维条码/二维码(2-dimensional bar code)是用某种特定的几何图形按一定规律在平面(二维方向上)分布的、黑白相间的、记录数据符号信息的图形;在代码编制上巧妙地利用构成计算机内部逻辑基础的“0”、“1”比特流的概念,使用若干个与二进制相对应的几何形体来表示文字数值信息,通过图象输入设备或光电扫描设备自动识读以实现信息自动处理:它具有条码技术的一些共性:每种码制有其特定的字符集;每个字符占有一定的宽度;具有一定的校验功能等。同时还具有对不同行的信息自动识别功能、及处理图形旋转变化点。
常应用于:
●信息获取(名片、地图、WIFI密码、资料)
●网站跳转(跳转到微博、手机网站、网站)
●广告推送(用户扫码,直接浏览商家推送的视频、音频广告)
●手机电商(用户扫码、手机直接购物下单)
●防伪溯源(用户扫码、即可查看生产地;同时后台可以获取最终消费地)
●优惠促销(用户扫码,下载电子优惠券,抽奖)
●会员管理(用户手机上获取电子会员信息、VIP服务)
●手机支付(扫描商品二维码,通过银行或第三方支付提供的手机端通道完成支付)
●账号登录(扫描二维码进行各个网站或软件的登录)
参考:
qt生成二维码
qzxing下载地址:
https://github.com/ftylitak/qzxing
下载后添加scr文件
因为源码都在这个文件里面,所以导入这个文件即可。
pro文件添加pri文件。
include(qzxing/qzxing.pri)
这里我把src文件名改为哦了qzxing
二维码使用-编码和解码
添加头文件。
#include “qzxing/QZXing.h”
代码:
//编码
QImage img = QZXing::encodeData("https://blog.csdn.net/weixin_44353958",QZXing::EncoderFormat_QR_CODE);
ui->label_4->setPixmap(QPixmap::fromImage(img));
ui->label_4->setScaledContents(true);//自适应
//解码
// QZXing decoder;
// //mandatory settings
// decoder.setDecoder( QZXing::DecoderFormat_QR_CODE | QZXing::DecoderFormat_EAN_13 );
// //optional settings
// //decoder.setSourceFilterType(QZXing::SourceFilter_ImageNormal | QZXing::SourceFilter_ImageInverted);
// decoder.setSourceFilterType(QZXing::SourceFilter_ImageNormal);
// decoder.setTryHarderBehaviour(QZXing::TryHarderBehaviour_ThoroughScanning |
// QZXing::TryHarderBehaviour_Rotate);
// //trigger decode
// QString result = decoder.decodeImage(img);
// qDebug()<<"result"<<result;
边栏推荐
- Global and Chinese market of transfer case 2022-2028: Research Report on technology, participants, trends, market size and share
- Leetcode the smallest number of the rotation array of the offer of the sword (11)
- 官网MapReduce实例代码详细批注
- Global and Chinese market of trimethylamine 2022-2028: Research Report on technology, participants, trends, market size and share
- 视觉上位系统设计开发(halcon-winform)-5.相机
- [cloud native training camp] module VIII kubernetes life cycle management and service discovery
- 4-33--4-35
- App global exception capture
- Byte practice plane longitude 2
- What is embedding (encoding an object into a low dimensional dense vector), NN in pytorch Principle and application of embedding
猜你喜欢
【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer
High quality workplace human beings must use software to recommend, and you certainly don't know the last one
Yolov5 series (I) -- network visualization tool netron
Remote server background hangs nohup
【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
4-24--4-28
Troubleshooting method of CPU surge
Unity hierarchical bounding box AABB tree
Redis cache penetration, cache breakdown, cache avalanche solution
Redis lock Optimization Practice issued by gaobingfa
随机推荐
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
Explanation of time complexity and space complexity
Idea does not specify an output path for the module
北京共有产权房出租新规实施的租赁案例
SQL server安装位置改不了
Enable multi-threaded download of chrome and edge browsers
Halcon与Winform学习第一节
Solve the problem that pushgateway data will be overwritten by multiple push
Global and Chinese market of transfer case 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets of AC electromechanical relays 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of Bus HVAC systems 2022-2028: Research Report on technology, participants, trends, market size and share
Série yolov5 (i) - - netron, un outil de visualisation de réseau
【pytorch学习笔记】Datasets and Dataloaders
Web server code parsing - thread pool
Global and Chinese market of lighting control components 2022-2028: Research Report on technology, participants, trends, market size and share
TPS61170QDRVRQ1
视觉上位系统设计开发(halcon-winform)-1.流程节点设计
App global exception capture
[cloud native training camp] module VIII kubernetes life cycle management and service discovery
[combinatorics] permutation and combination (set permutation, step-by-step processing example)