{"id":13799249,"url":"https://github.com/scytheStudio/SCodes","last_synced_at":"2025-05-13T06:32:47.416Z","repository":{"id":38198134,"uuid":"288114834","full_name":"scytheStudio/SCodes","owner":"scytheStudio","description":"This project is Qt \u0026 Qml wrapper for ZXing-C++ Library that is used for decoding 1D and 2D barcodes.","archived":false,"fork":false,"pushed_at":"2024-11-14T18:22:05.000Z","size":3530,"stargazers_count":114,"open_issues_count":13,"forks_count":38,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-14T19:29:29.794Z","etag":null,"topics":["qml","qt","zxing","zxing-cpp"],"latest_commit_sha":null,"homepage":"https://scythe-studio.com/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scytheStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-17T07:39:57.000Z","updated_at":"2024-11-14T18:22:09.000Z","dependencies_parsed_at":"2024-01-05T20:50:12.787Z","dependency_job_id":"6bd38ed7-60f2-4bcc-9c00-86f5ac5516f2","html_url":"https://github.com/scytheStudio/SCodes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scytheStudio%2FSCodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scytheStudio%2FSCodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scytheStudio%2FSCodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scytheStudio%2FSCodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scytheStudio","download_url":"https://codeload.github.com/scytheStudio/SCodes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225183837,"owners_count":17434196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qml","qt","zxing","zxing-cpp"],"created_at":"2024-08-04T00:01:00.326Z","updated_at":"2025-05-13T06:32:47.402Z","avatar_url":"https://github.com/scytheStudio.png","language":"C++","readme":"![SCodes ](/assets/scodes.png)\n# SCodes\n\nThis project is Qt \u0026 Qml wrapper for [ZXing-C++ Library](https://github.com/nu-book/zxing-cpp) 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.\n\nThanks to SCodes you can start scanning barcodes in few steps. We used Qt 5.15.2 and Qt 6.3.0 to built wrapper and example applications, but it's compatible with older Qt versions as well.\n\nImplementation of same method for both Qt version does not seems possible([check why](#porting)). We have ported the SCodes wrapper to Qt6 by following the multimedia [changes](https://doc-snapshots.qt.io/qt6-6.3/qtmultimedia-changes-qt6.html).\n\n---\n\n[![Scythe Studio](./assets/scytheStudioLogo.png)](https://scythe-studio.com)\n\n[![Built with Qt](./assets/buildWithQt.png)](https://qt.io)\n\n---\n\n## Supported Formats\n\nThere are plenty of supported formats and we constantly work on adding new.\n\n## Supported 1D Formats\n\n|      Format      |    Supports scanning     |    Supports generating\n| ---------------- | ------------------------ |    -------------------\n|      UPC-A       |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|      UPC-E       |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|      EAN-8       |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|      EAN-13      |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|     DataBar      |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e❌\u003c/center\u003e\n| DataBar Expanded |   \u003ccenter\u003e❌\u003c/center\u003e    |   \u003ccenter\u003e❌\u003c/center\u003e\n|     Code 39      |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|     Code 93      |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|     Code 128     |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|     Codabar      |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|       ITF        |   \u003ccenter\u003e❌\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n\n## Supported 2D Formats\n\n|    Format    |    Supports scanning     |    Supports generating\n| ------------ | ------------------------ |    -------------------\n|   QR Code    |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|  DataMatrix  |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|    Aztec     |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|    PDF417    |   \u003ccenter\u003e✔️\u003c/center\u003e    |   \u003ccenter\u003e✔️\u003c/center\u003e\n|   MaxiCode   |   \u003ccenter\u003e❌\u003c/center\u003e    |   \u003ccenter\u003e❌\u003c/center\u003e\n\n\n# How to use wrapper?\n![SCodes Scanner Preview](/assets/scanner.gif)![SCodes Generator Preview](/assets/generator.gif)\n\n## Using \n\nFeel free to read [\"How to scan barcodes in Qt Qml application\" blog post](https://scythe-studio.com/blog/how-to-scan-barcodes-in-qt-qml-application) if you are interested in the details behind scanning mechanism. Also you can try out the QmlReaderExample in order to see how it is working.\n\nSCodes supports generating barcodes as well. It is covered in [\"How to generate barcode in Qt Qml\" application blog post](https://scythe-studio.com/en/blog/how-to-generate-barcode-in-qt-qml-application).  Also you can try out the QmlGeneratorExample in order to see how it is working.\n\nAbove blog posts contains step by step tutorial on how to do that for Qt5 version. For Qt6 ([see here](#porting)).\n\n### qmake\nAll you need to do is to follow these steps.\n\n1. Add SCodes as submodule, by typing `git submodule add git@github.com:scytheStudio/SCodes.git`\n2. Update submodule `git submodule update --recursive --init` (you can also put wrapper files to your project manually without adding submodule)\n3. Add `include(scodes/src/SCodes.pri)` to your .pro file\n4. If you want to use barcode reader functionality you need to register `SBarcodeFilter` class for Qt5 or `SBarcodeScanner` class for Qt6. For both version, separate them with if directive to register as we did in barcode reader example([how to register reader class](#register-reader)). As for barcode generator functionality you just need to register `SBarcodeGenerator` class([how to register generator class](#register-generator)).\n5. Import SCodes in your Qml file `import com.scythestudio.scodes 1.0`\n6. Import multimedia module `import QtMultimedia 5.15` for Qt5 or `import QtMultimedia` for Qt6.\n7. If build fails, try to add `CONFIG += c++17` to your .pro file\n8. You are done. Get inspired by [Qt5 QML Barcode Reader demo](https://github.com/scytheStudio/SCodes/blob/master/examples/QmlBarcodeReader/qml/Qt5ScannerPage.qml) or [Qt6 QML Barcode Reader demo](https://github.com/scytheStudio/SCodes/blob/master/examples/QmlBarcodeReader/qml/Qt6ScannerPage.qml) to test wrapper.\n\n### CMake\n\n1. Add SCodes as submodule, by typing `git submodule add git@gitlab.com:scythestudio/scodes.git`\n2. Update submodule `git submodule update --recursive --init` (you can also put wrapper files to your project manually without adding submodule)\n3. Add to your project SCodes library\n\n    ```CMake\n        add_subdirectory(SCodes)\n    ```\n\n4. Link SCodes library to your library or executable. \n\n    ```CMake \n        target_link_libraries(${PROJECT_NAME} PUBLIC SCodes)\n    ```\n\n5. Import SCodes in your Qml file \n\n    ```qml\n        import com.scythestudio.scodes 1.0\n    ```\n\n6. You are done. Get inspired by [QML Barcode Reader demo](https://github.com/scytheStudio/SCodes/blob/master/examples/QmlBarcodeReader/qml/ScannerPage.qml) to test wrapper.\n\n\u003ca name=\"register-reader\"\u003e\u003c/a\u003e\n### How to do\nRegistering the barcode reader classes with if directive:\n\n```c++\n    #if QT_VERSION \u003c QT_VERSION_CHECK(6, 0, 0)\n        qmlRegisterType\u003cSBarcodeFilter\u003e(\"com.scythestudio.scodes\", 1, 0, \"SBarcodeScanner\");\n    #else\n        qmlRegisterType\u003cSBarcodeScanner\u003e(\"com.scythestudio.scodes\", 1, 0, \"SBarcodeScanner\");\n    #endif\n```\n\u003ca name=\"register-generator\"\u003e\u003c/a\u003e\nRegistering the barcode generator class with associated enum:\n```c++\n    qmlRegisterType\u003cSBarcodeGenerator\u003e(\"com.scythestudio.scodes\", 1, 0, \"SBarcodeGenerator\");\n    qmlRegisterUncreatableMetaObject(SCodes::staticMetaObject, \"com.scythestudio.scodes\", 1, 0, \"SCodes\", \"Error: only enums\");\n```\n\n\u003ca name=\"porting\"\u003e\u003c/a\u003e\n### Implementation details in Qt6\n\nQt's multimedia library has major changes. The most importants are, changes in QML `VideoOutput`, absence of `QVideoFilterRunnable` and `QAbstractVideoFilter` classes in Qt6.\n\nSCodes library is using `SBarcodeFilter` class for Qt5 and `SBarcodesScanner` class for Qt6 version. \n\nIf you want to read more about implementation details of the library in Qt6 read the document: [Implementation Details in Qt6](https://github.com/scytheStudio/SCodes/blob/master/doc/detailsQt6.md)\n\n\n### Trying various formats\n`SBarcodeFilter` is a class that you need to use for scanning case. By default it scans only specific basic formats of code (Code 39, Code 93, Code 128, QR Code and DataMatrix.).\nThe goal of that is to limit number of possible formats and improve performance.\n\nTo specify formats that should be accepted by the `SBarcodeFilter` instance, you need to set it's `format` property accordingly. This property allows setting multiple enum values as it's for flags. Add the following to your `SBarcodeFilter` item in Qml code:\n```qml\nComponent.onCompleted: {\n    barcodeFilter.format = SCodes.OneDCodes\n}\n```\nSee the enumeration values that represent supported formats in [SBarcodeFormat.h](https://github.com/scytheStudio/SCodes/blob/master/src/SBarcodeFormat.h)\nTo accept all supported formats use `SCodes.Any`.\n\n## Note \n\nBoth build systems have their examples located in same directory. All you need to do is to just open proper file(CMakeLists.txt or *.pro file) for different build system to be used.\n\n\n### The examples tested on below kits:\n\n#### Qt5.15.2 or less,\n\n| PROJECT | BUILD SYSTEM | WINDOWS-MinGW | WINDOWS-MSVC | LINUX-GCC | ANDROID |\n| ------ | ------ | ------ | ------ | ------ | ------ |\n| QmlBarcodeReader | qmake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeGenerator | qmake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeReader | CMake |\u003ccenter\u003e❌\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeGenerator | CMake |\u003ccenter\u003e❌\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n\n#### Qt6.3.0,\n\n| PROJECT | BUILD SYSTEM | WINDOWS-MinGW | WINDOWS-MSVC | LINUX-GCC | ANDROID |\n| ------ | ------ | ------ | ------ | ------ | ------ |\n| QmlBarcodeReader | qmake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeGenerator | qmake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeReader | CMake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n| QmlBarcodeGenerator | CMake |\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\u003ccenter\u003e✔️\u003c/center\u003e|\n\nPlease ensure that proper Java \u0026 NDK version installed on your system. This examples tested w/ Java 11 and 22.1.7171670 Android NDK version.\n\n## About Scythe Studio\nWe’re a team of **Qt and C++ enthusiasts** dedicated to helping businesses build great cross-platform applications. As an official Qt Service Partner, we’ve earned the trust of companies across various industries by delivering high-quality, reliable solutions. With years of experience in **Qt and QML development**, we know how to turn ambitious ideas into outstanding products.\n\n\u003ctable style=\"margin: 0 auto; border:0;\"\u003e\n    \u003ctr style=\"border:0\"\u003e\n        \u003ctd style=\"border:0\"\u003e\n            \u003ca href=\"https://scythe-studio.com\"\u003e\n                \u003cimg width=\"340\" height=\"150\"\n                    src=\"https://user-images.githubusercontent.com/45963332/221174257-c1e1a9d9-0efa-4b25-996b-4b364ccb325c.svg\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd style=\"border:0\"\u003e\n            \u003ca href=\"https://clutch.co/profile/scythe-studio\"\u003e\n                \u003cimg height=\"150\" width=\"150\"\n                    src=\"https://github.com/user-attachments/assets/023e102e-84c1-4e7e-b9de-cae476e681e7\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd style=\"border:0\"\u003e\n            \u003ca href=\"https://scythe-studio.com/en/iso\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/a5388270-4be7-4f37-bbfa-6e41a820ca36\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n        \u003ctd style=\"border:0\"\u003e\n            \u003ca href=\"https://scythe-studio.com/en/iso\"\u003e\n                \u003cimg src=\"https://github.com/user-attachments/assets/a5388270-4be7-4f37-bbfa-6e41a820ca36\"\u003e\n            \u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nWe offer a wide range of services—from brainstorming ideas to delivering polished applications—always tailored to our clients’ needs. By combining deep knowledge of Qt modules and modern technologies with a practical, cost-effective approach, we create solutions that truly make a difference.\n\n## Professional Support\nNeed help with anything? We’ve got you covered. Our professional support services are here to assist you with. For more details about support options and pricing, just drop us a line at https://scythe-studio.com/en/contact.\n\n## Follow us\n\nCheck out those links if you want to see Scythe Studio in action and follow the newest trends saying about Qt Qml development.\n\n* 🌐 [Scythe Studio Website](https://scythe-studio.com/en/)\n* ✍️  [Scythe Studio Blog Website](https://scythe-studio.com/en/blog)\n* 👔 [Scythe Studio LinkedIn Profile](https://www.linkedin.com/company/scythestudio/mycompany/)\n* 👔 [Scythe Studio Facebook Page](https://www.facebook.com/ScytheStudiio)\n* 🎥 [Scythe Studio Youtube Channel](https://www.youtube.com/channel/UCf4OHosddUYcfmLuGU9e-SQ/featured)\n","funding_links":[],"categories":["Images","Libraries"],"sub_categories":["Integrations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FscytheStudio%2FSCodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FscytheStudio%2FSCodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FscytheStudio%2FSCodes/lists"}