資源簡介
使用QZXing庫實現二維碼的生成與解析
壓縮包里包含QZXing庫,同時可以識別中文

代碼片段和文件信息
#include?
#include?“LHCQZXingQRCode.h“
#include?“QZXing/QZXing.h“
LHCQZXingQRCode::LHCQZXingQRCode(QWidget?*parent)
:?QMainWindow(parent)
{
ui.setupUi(this);
ui.widget->setAutoFillBackground(true);
}
void?LHCQZXingQRCode::on_pushButton_clicked()
{
//文字為中文時,不包含換行符,掃描為亂碼;
QString?lineText?=?ui.lineEdit->text()?+?“\n“;
QZXing?decoder;
QImage?decoderImage?=?decoder.encodeData(lineText);
QPalette?palette;
palette.setBrush(this->backgroundRole()?QBrush(decoderImage));
ui.widget->setPalette(palette);
}
void?LHCQZXingQRCode::on_pushButton_2_clicked()
{
QString?file_path?=?QFileDialog::getOpenFileName(this);
QImage?imageToDecode(file_path);
QZXing?decoder;
decoder.setDecoder(QZXing::DecoderFormat_QR_CODE?|?QZXing::DecoderFormat_EAN_13);
QString?result?=?decoder.decodeImage(imageToDecode);
ui.lineEdit_2->setText(result);
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A..H.?????52736??2019-04-09?14:04??QZXingCodeATest\LHCQZXingQRCode\.vs\LHCQZXingQRCode\v14\.suo
?????文件???????3444??2019-04-09?10:43??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\1554777836.png
?????文件???????3545??2019-04-09?13:52??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\1554789159.png
?????文件???????3910??2019-04-09?13:53??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\1554789186.png
?????文件???????3842??2019-04-09?11:44??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\GeneratedFiles\Debug\moc_LHCQZXingQRCode.cpp
?????文件??????26228??2019-04-09?11:13??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\GeneratedFiles\Debug\moc_QZXing.cpp
?????文件???????1445??2019-04-09?11:13??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\GeneratedFiles\qrc_LHCQZXingQRCode.cpp
?????文件???????7079??2019-04-09?13:47??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\GeneratedFiles\ui_LHCQZXingQRCode.h
?????文件????????912??2019-04-09?14:02??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.cpp
?????文件????????332??2019-04-09?11:42??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.h
?????文件?????????75??2019-04-08?15:24??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.qrc
?????文件???????4374??2019-04-09?13:43??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.ui
?????文件???????9876??2019-04-09?11:39??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.vcxproj
?????文件???????2345??2019-04-09?11:39??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.vcxproj.filters
?????文件????????639??2019-04-09?14:00??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\LHCQZXingQRCode.vcxproj.user
?????文件????????193??2019-04-09?13:31??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\main.cpp
????..A..H.?????23552??2019-04-08?19:05??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\QZXing\.vs\QZXing\v14\.suo
?????文件???????7528??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\QZXing\QZXing.h
?????文件????????833??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\QZXing\QZXing_global.h
?????文件????1944576??2019-04-09?10:03??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\QZXing\x64_QZXing2.dll
?????文件??????13594??2019-04-09?10:03??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\QZXing\x64_QZXing2.lib
?????文件????1944576??2019-04-09?10:03??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\x64_QZXing2.dll
?????文件??????13594??2019-04-09?10:03??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\x64_QZXing2.lib
?????文件???10424320??2019-04-09?10:03??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\x64_QZXing2.pdb
?????文件???????1357??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\aztec\AztecDetectorResult.h
?????文件???????1314??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\aztec\AztecReader.h
?????文件???????1859??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\aztec\decoder\Decoder.h
?????文件???????2898??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\aztec\detector\Detector.h
?????文件???????1356??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\BarcodeFormat.h
?????文件???????1332??2019-04-03?17:19??QZXingCodeATest\LHCQZXingQRCode\LHCQZXingQRCode\zxing\Binarizer.h
............此處省略674個文件信息
- 上一篇:福昕PDF編輯器漢化破解版
- 下一篇:grunt-cli模塊
評論
共有 條評論