Unsolved Enabling Qt into an Android native App already developed without Qt
-
Hi all, I'm new and I never used Qt. I received a Qt script and I have native code of an Android App. Is it possible to integrate this Qt script into native code of Android App? Or do I have to create a new Android App from scratch in order to use Qt? Could you please link me some tutorials to get started into this direction (use Qt script into an Android App already developed without QT support). Thank you a lot
-
@gianpierop What do you mean by "Qt script"? Do you mean you have some C++ code using Qt? Or QML?
-
Sorry. You're right. In general that's C++ implementation with Qt Framework. I said script because there are also javascripts interpreted by Qt. But my idea is general.
In other words, can I integrate a Qt interpreter and C++ source code into an existing native source code App? Then I'd like to instantiate a C++ / Qt class and invoke some method from the java source code of my android app.
-
@gianpierop I'm not a Java expert, but as far as I know you can call C++ from Java. So, it should be possible.
-
@jsulm Yes, what you say is called native calls, but it depends on the Operating System. However in this case the C++ code is written within the Qt Framework and I guess that I have to put some .so objects and some configuration in order to make the app working, is it true? And if this is the case, is it possible to add Qt dependencies into an App already created without Qt dependencies?
Regards.
Gianpiero -
@gianpierop You will need to add Qt libraries used in your C++ code. And you will most probably need to start the Qt event loop (usually done by calling QApplication app; app.exec();). How to add libraries to your Android app depends on what tools/build system you use. I'm not an expert here.
-
@jsulm Thank you for your first hints and for telling me it can do: so is not stupid if I start to study some Qt tutorials in order to understand what I have to do.