Skip to content

This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.Qt
Notifications You must be signed in to change notification settings

itdelsat/SCodes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCodes

SCodes

This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding and generating 1D and 2D barcodes. This particular C++ ZXing port is one of the most recent C++ versions of popular ZXing library using modern compilers.

The goal of this project was to create convenient filter allowing to process video frame from phone camera. Thanks to SCodes you can start scanning barcodes in few steps. We used Qt 5.15 to built both wrapper and example application, but it's compatible with older Qt versions as well. Feel free to read "How to scan barcodes in Qt Qml application" blog post if you are interested in the details behind scanning mechanism. This blog post contains ste by step tutorial on how to do that.

SCodes supports generating barcodes as well. It will be covered in another blog post soon.

Supported Formats

ZXing-C++ Library supports many other formats, but currently it is possible to only use these two barcode formats.

1D 2D
Code 128 QR Code

How to use wrapper?

SCodes Scanner PreviewSCodes Generator Preview

All you need to do is to follow these steps.

  1. Add SCodes as submodule, by typing git submodule add git@gitlab.com:scythestudio/scodes.git
  2. Update submodule git submodule update --recursive --init (you can also put wrapper files to your project manually without adding submodule)
  3. Add include(scodes/src/SCodes.pri to your .pro file
  4. Import SCodes in your Qml file import com.scythestudio.scodes 1.0
  5. Import multimedia module import QtMultimedia 5.15
  6. If build fails, try to add CONFIG += c++17 to your .pro file
  7. You are done. Get inspired by QML Barcode Reader demo to test wrapper.

If you use Qt version older than 5.15 you need to manually register SBarcodeFilter e.g. in main.cpp. Use this line for this purpose:

qmlRegisterType<MyClass>("com.scythestudio.scodes", 1, 0, "SBarcodeFilter");

Don't forget to firstly include SBarcodeFilter.

In the case of barcodes scanning you will need to expose SBarcodeGenerator class. If you are using SCodes for this case, check our QML Barcode Generator demo to do that easily!

About

This project is Qt & Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.Qt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 35.0%
  • QMake 34.0%
  • C 31.0%