Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zxing-cpp/example/ZXingQtCamReader.cpp @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 /* | |
| 2 * Copyright 2020 Axel Waggershauser | |
| 3 */ | |
| 4 // SPDX-License-Identifier: Apache-2.0 | |
| 5 | |
| 6 #include <QGuiApplication> | |
| 7 #include <QQmlApplicationEngine> | |
| 8 | |
| 9 #include "ZXingQtReader.h" | |
| 10 | |
| 11 int main(int argc, char *argv[]) | |
| 12 { | |
| 13 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) | |
| 14 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | |
| 15 #endif | |
| 16 | |
| 17 ZXingQt::registerQmlAndMetaTypes(); | |
| 18 | |
| 19 QGuiApplication app(argc, argv); | |
| 20 app.setApplicationName("ZXingQtCamReader"); | |
| 21 QQmlApplicationEngine engine; | |
| 22 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) | |
| 23 engine.load(QUrl(QStringLiteral("qrc:/ZXingQt5CamReader.qml"))); | |
| 24 #else | |
| 25 engine.load(QUrl(QStringLiteral("qrc:/ZXingQt6CamReader.qml"))); | |
| 26 #endif | |
| 27 if (engine.rootObjects().isEmpty()) | |
| 28 return -1; | |
| 29 | |
| 30 return app.exec(); | |
| 31 } |
