-
Hi, long time no see. Recently encountered a kind of problem. That is, how to register some third-party components of Java into Qml, such as the ZXing QR code component, how to register a ZXing component, and then display it in the Image component of Qml? This is easy in C++ because ZXing has support for C++, but in Java I'm a little clueless. I know this question is inappropriate to ask here, but you are the author of QtJambi and I think you must know the solution. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I am not familiar with ZXing. If you want to register third-party components to Qml you must make sure these component types are subclasses of QObject. As far as I see, ZXing does not use Qt, thus, one of the components are expected to derive from QObject. Thus, you need to write wrapper types of QObject making the third-party components accessible in Qml. These wrapper classes are to be registered to Qml. |
Beta Was this translation helpful? Give feedback.
I am not familiar with ZXing. If you want to register third-party components to Qml you must make sure these component types are subclasses of QObject. As far as I see, ZXing does not use Qt, thus, one of the components are expected to derive from QObject. Thus, you need to write wrapper types of QObject making the third-party components accessible in Qml. These wrapper classes are to be registered to Qml.