Regarding the barcode reader in Qt
-
Hi,
I require the information, where to read the barcode value and display in Qt, and display in any one of visual element say QLabel, QTextEdit.
While searching i got the project, from the link below.
https://github.com/ftylitak/qzxing/tree/master/examples
can anyone provide the guidance how can i start for implementing in Qt, to read the barcode value?.
Thanks,
-
Try looking at this example and change the decode format in the constructor of
QQrDecoder
-
I just downloaded and changd in constructor, the following lines of code.
m_centralwidget = new QCameraControllerWidget(this); m_centralwidget->setObjectName(QStringLiteral("centralwidget")); this->setCentralWidget(m_centralwidget); connect(m_centralwidget,SIGNAL(imageCaptured(QImage)),this,SLOT(decodeImage(QImage))); connect(&decoder,SIGNAL(tagFound(QString)),this,SLOT(reportTagFound(QString)));
And when i run the application i get the following errors, as failed to start video surface
QML debugging is enabled. Only use this in a safe environment.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Failed to start video surface
CameraBin error: "Internal data flow error."Guidance is required?.
And has anyone tried to read the barcode value using Qt?. -
Hi
The "libpng warning: iCCP: known incorrect sRGB profile" can be ignored.The "CameraBin error: "Internal data flow error.""
seems to come when it cant find your camera or do not like it or its default format.
http://stackoverflow.com/questions/17650710/recording-video-from-usb-cam-with-qt5What barcode format are you aiming at?
What scanner/ camera are you using to scan the barcode? -
I am not aiming at specific barcode format.
But to get the values out of barcode and append to QLabel or QTextEdit.
using QCamera. Any suggestions?. -
@Pradeep-Kumar
Yes, first you must understand that bar code has formats.
Just like an image format, say JPG and GIF.
You can use the following formats:
UPC-A
UPC-E
EAN-8
EAN-13
ITF
Code 39
Code 93
Code 128
Codabar
QR Code
Data Matrix
Aztec (beta)
PDF 417 (beta)So your INPUT must be encoded in that format for you to be able to read it.
IF you are not using a scanner or camera, you need to find out IF and how it will
accept an image of a barcode. And if it does, what format of the image it accepts.So u need to be clear about
Bar code format used
How you get the barcode
and what options the qzxing has for the input. -
yes @mrjj i will go through ,
similar could helpand QRcode also will help
-
Hello,
i wanted to reply to this thread even though it is quite old in order to give a suggestion for future reference.
In QZXing's examples, the project "QQrDecoder" that you have used is deprecated thus I removed it from the repository to avoid any further confusion. It is now replaced by the project QZXingLive. The intention is to make this project as complete as possible for all the supported platforms. Thus, in case you come up to any issue feel free to open issue at the project's page.
(...and a note that goes back many years, the QQrDecoder was the first example made for QZXing back in the days of Symbian...)
-
Hi! You can scan the barcodes easily using some library. I would recommend using SCodes, which is easy to use, and also allows you to draw your own QR/barcodes. It's based on ZXing C++ port, like popular QZxing. You can read more about it here.