Giter Club home page Giter Club logo

Comments (10)

ftylitak avatar ftylitak commented on August 15, 2024

Have you followed these steps:

  1. add include(QZXing/QZXing.pri) in your pro file
  2. do not add CONFIG += staticlib. I am mentioning this because in #72 you had included it though it was not needed in that case.
  3. copy the QZXing folder in the same folder that the .pro file of your project is.
  4. add the following two lines to the main.cpp
QZXing::registerQMLTypes();
QZXing::registerQMLImageProvider(engine);

The QZXing.h no such file or directory !! is related to the steps 1 and 3, and the reference : module "QZXing" is not installed in qml at QT platform with step 4.

If you are still experiencing issues, I will need better explanation and/or logs.

from qzxing.

TM9412 avatar TM9412 commented on August 15, 2024

i added this library in my project on x86 system and i am run project on other platform so during that an getting this error

QML Image: Invalid image provider: image://qzxing/encode/123456

#72 is working fine on my x86 platform in qt creator

from qzxing.

ftylitak avatar ftylitak commented on August 15, 2024

Try to use correct casing to the QZXing.

text: image://QZXing/encode/123456

from qzxing.

TM9412 avatar TM9412 commented on August 15, 2024

I gave correct case in qml file
source: "image://QZXing/encode/" + inputField.text;

and i added library name is QZXing

from qzxing.

ftylitak avatar ftylitak commented on August 15, 2024

Have you added in the .pro file the following line before the include statement of the QZXing.pri?

CONFIG += qzxing_qml

If you are still experiencing problems, I need more information to be able to help you.
I am guessing that you could be registering the image provider to an engine different from the one that loads the QML files. Though, I can not go further in guesses if you do not share pieces of code and/or logs along with a detailed problems that you are having. In your first message you mentioned something different from the problem that you mentioned in your second message.

from qzxing.

ftylitak avatar ftylitak commented on August 15, 2024

Interesting, automotive eh.

Have you tried to compile and run your initial/test project on that platform?
Also, to be clear, you are continuing to receive only the following error:

reference : module "QZXing" is not installed in qml at QT platform

correct?

from qzxing.

oKcerG avatar oKcerG commented on August 15, 2024

@TM9412 Can you share your main.cpp ?

from qzxing.

TM9412 avatar TM9412 commented on August 15, 2024

Hi @oKcerG @ftylitak

Can you please tell me How this line code is working ?
source: "image://QZXing/encode/" + inputField.text;

In QML it is working fine and it is able to generate QRcode but in my work project it is showing
warning : QML Image: Invalid image provider: image://qzxing/encode/
and not able to create QRcode.

from qzxing.

ftylitak avatar ftylitak commented on August 15, 2024

Hello @TM9412

I have seen all your questions on this subject, here, and in Qt forum and in stackoverflow.

If I were you, I would start by reading the documentation of QQuickImageProvider. It provides a clear explanation of the implementation that has been done in QZXing.

Also, you need to be clearer in your messages. For instance, your sentence "In QML it is working fine" is confusing. I understand by your previous messages that you meant to say that it is working fine for for x86-x64 platforms.

Now, regarding your issue, as I said before, since I suppose that you want to integrate this to an already existing project, I believe that either you do not call

QZXing::registerQMLImageProvider(engine);

or the engine instance that you provide to registerQMLImageProvider function is not the same engine as the one used in the application to load the views.

In case you continue to face issues, the only way is to share code parts. In case you do not want to publicly share code, you can sent me a private message.

from qzxing.

TM9412 avatar TM9412 commented on August 15, 2024

yes @ftylitak
the engine instance that you provide to registerQMLImageProvider function is not the same engine as the one used in the application to load the views.

due to this problem I am not able to generate QR-code
I passed the same engine and able to generate qrcode

Thank you for Help .!!

from qzxing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.