mirror of https://github.com/status-im/qzxing.git
fine tune the use of QZXing::registerQMLTypes to include the QZXingFilter. Update QZXingLive with the latest changes
This commit is contained in:
parent
905ee3359a
commit
75eb47e8c5
|
@ -5,7 +5,7 @@
|
|||
#include <QDebug>
|
||||
|
||||
#include <Qt>
|
||||
#include "QZXingFilter.h"
|
||||
#include <QZXing.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -13,8 +13,7 @@ int main(int argc, char *argv[])
|
|||
QGuiApplication app(argc, argv);
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
qmlRegisterType<QZXingFilter>("QZXing", 2, 3, "QZXingFilter");
|
||||
qmlRegisterType<QZXing>("QZXing", 2, 3, "QZXing");
|
||||
QZXing::registerQMLTypes();
|
||||
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
return app.exec();
|
||||
|
|
|
@ -79,6 +79,11 @@ public:
|
|||
static void registerQMLTypes()
|
||||
{
|
||||
qmlRegisterType<QZXing>("QZXing", 2, 3, "QZXing");
|
||||
|
||||
#ifdef QZXING_MULTIMEDIA
|
||||
qmlRegisterType<QZXingFilter>("QZXing", 2, 3, "QZXingFilter");
|
||||
#endif //QZXING_MULTIMEDIA
|
||||
|
||||
}
|
||||
#endif //QT_VERSION >= Qt 4.7
|
||||
|
||||
|
|
|
@ -262,6 +262,8 @@ qzxing_qml {
|
|||
qzxing_multimedia {
|
||||
QT += multimedia
|
||||
|
||||
DEFINES += QZXING_MULTIMEDIA
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/QZXingFilter.h
|
||||
|
||||
|
|
Loading…
Reference in New Issue