当前位置:网站首页>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;

边栏推荐
- [transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
- Web server code parsing - thread pool
- 4-24--4-28
- Kubernetes帶你從頭到尾捋一遍
- There are links in the linked list. Can you walk three steps faster or slower
- Class part2
- Redis主从、哨兵、集群模式介绍
- How does vs+qt set the software version copyright, obtain the software version and display the version number?
- Byte practice surface longitude
- The first character of leetcode sword offer that only appears once (12)
猜你喜欢

Unity hierarchical bounding box AABB tree

视觉上位系统设计开发(halcon-winform)-5.相机

视觉上位系统设计开发(halcon-winform)-1.流程节点设计

Kubernetes advanced training camp pod Foundation

How does vs+qt set the software version copyright, obtain the software version and display the version number?

redis缓存穿透,缓存击穿,缓存雪崩解决方案
![[attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer](/img/9b/6ca8375ef8689a80d437665909ae30.png)
[attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer

Byte practice plane longitude 2

Can‘t connect to MySQL server on ‘localhost‘
![[cloud native training camp] module VIII kubernetes life cycle management and service discovery](/img/87/92638402820b32a15383f19f6f8b91.png)
[cloud native training camp] module VIII kubernetes life cycle management and service discovery
随机推荐
[transform] [NLP] first proposed transformer. The 2017 paper "attention is all you need" by Google brain team
Global and Chinese market of postal automation systems 2022-2028: Research Report on technology, participants, trends, market size and share
Chapter 04_ Logical architecture
XWiki Installation Tips
Composite type (custom type)
Kubernetes vous emmène du début à la fin
Global and Chinese market of trimethylamine 2022-2028: Research Report on technology, participants, trends, market size and share
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
Class part2
4-20-4-23 concurrent server, TCP state transition;
[pytorch learning notes] datasets and dataloaders
Dataframe returns the whole row according to the value
Troubleshooting method of CPU surge
High quality workplace human beings must use software to recommend, and you certainly don't know the last one
Construction of operation and maintenance system
Solve the problem that pushgateway data will be overwritten by multiple push
B2020 points candy
4-24--4-28
Byte practice plane longitude 2
What is label encoding? How to distinguish and use one hot encoding and label encoding?