Use QZXing in qml
-
@MHermann said in Use QZXing as library in qml:
Any ideas what I am doing wrong?
are you sure the
libQZXing.so
relies in$$PWD/QZXing/
??@raven-worx : Yes, I compiled it and copied it there.
-
@MHermann said in Use QZXing as library in qml:
Any ideas what I am doing wrong?
are you sure the
libQZXing.so
relies in$$PWD/QZXing/
??@raven-worx :
The three linesQZXing decoder; decoder.setDecoder(QZXing::DecoderFormat_QR_CODE); QString resultQrCode = decoder.decodeImage(qrCodeimageToDecode);
are executing without problems. And they are also used from libQZXing.so.
-
@raven-worx :
The three linesQZXing decoder; decoder.setDecoder(QZXing::DecoderFormat_QR_CODE); QString resultQrCode = decoder.decodeImage(qrCodeimageToDecode);
are executing without problems. And they are also used from libQZXing.so.
are executing without problems. And they are also used from libQZXing.so.
Yes i overread that.
seems the
QZXING_QML
macro definition is missing.
Recompile the lib withCONFIG += qzxing_qml
-
are executing without problems. And they are also used from libQZXing.so.
Yes i overread that.
seems the
QZXING_QML
macro definition is missing.
Recompile the lib withCONFIG += qzxing_qml
@raven-worx :
I added the lineCONFIG += qzxing_qml
to QZXing.pro and compiled the lib again.
I copied the new *.so files to my directory.
But it behaves exactly the same...
"undefined reference to `QZXing::registerQMLTypes()'"I forgot to mention, that I also added additional arguments in my project:
DEFINES+=QZXING_QML DEFINES+=QML_MULTIMEDIA
Any more ideas?
-
@raven-worx :
I added the lineCONFIG += qzxing_qml
to QZXing.pro and compiled the lib again.
I copied the new *.so files to my directory.
But it behaves exactly the same...
"undefined reference to `QZXing::registerQMLTypes()'"I forgot to mention, that I also added additional arguments in my project:
DEFINES+=QZXING_QML DEFINES+=QML_MULTIMEDIA
Any more ideas?
@MHermann said in Use QZXing as library in qml:
Any more ideas?
No, this seemed pretty much the cause for issue to me.
Alternatively - if its's an option for you - you could add
include($$PWD/QZXing/src/QZXing.pri
(and also addCONFIG += qzxing_qml
) to your application's .pro file. Then QZXing is compiled into your binary directly. -
@MHermann said in Use QZXing as library in qml:
Any more ideas?
No, this seemed pretty much the cause for issue to me.
Alternatively - if its's an option for you - you could add
include($$PWD/QZXing/src/QZXing.pri
(and also addCONFIG += qzxing_qml
) to your application's .pro file. Then QZXing is compiled into your binary directly.This could also be a solution. But this would not be my preferred solution...
That would mean that the whole QZXing source code will be compiled too, each time I am compiling my own source code.
Or is it possible to exclude this from the compiling process and compile it only once? -
This could also be a solution. But this would not be my preferred solution...
That would mean that the whole QZXing source code will be compiled too, each time I am compiling my own source code.
Or is it possible to exclude this from the compiling process and compile it only once?@MHermann
it gets only recompiled when it needs to (when a source file changes, etc) -
@MHermann
it gets only recompiled when it needs to (when a source file changes, etc)I added the QZXing source code via
include($$PWD/QZXing/src/QZXing.pri
Now it is working.
-
Hi! If your project is based on C++, consider using SCodes. SCodes uses latest ZXing C++ port. It also allows you to generate QR/Bar codes. You can read more about it here.
-
Hi! If your project is based on C++, consider using SCodes. SCodes uses latest ZXing C++ port. It also allows you to generate QR/Bar codes. You can read more about it here.
@lukas_kosinski unfortunately SCodes only supports Code128 and QR
-
@lukas_kosinski unfortunately SCodes only supports Code128 and QR
@ekkescorner I worked on that and now it supports much more formats. Currently it's a PR opened, but it should be soon merged:
https://github.com/scytheStudio/SCodes/pull/11Sorry that I add the comment to a quite old post. I simply wanted people to know it and not be misled.