Integrate QT in existing Android application
-
wrote on 26 Dec 2014, 07:49 last edited by
We need to integrate part of QT in existing Android java application - implement QT GUI on ONE of SurfaceView:
Somehow draw all widgets on this SurfaceView and redirect all click/touch events from SurfaceView to appropriate QT widgets.Is it possible in QT 5.4 and how it should be done ?
-
wrote on 26 Dec 2014, 10:09 last edited by
I think it's quite complicated, because a Qt application (Qt no QT) it use a custom Android activity and application to bind the Qt framework to the Android part. So, from what I know, it's not so simple to use just a part of Qt into an other Android application.
My suggestion is to try to do the viceversa, try to integrate part of an Android java application into a Qt application, maybe it's easier.
-
wrote on 26 Dec 2014, 18:05 last edited by
The easiest way would be to start out with a simple Qt application and to integrate your Java parts into that.
There are a number of ressources available, to show you how to bridge the gap between Java and Qt/C++ via JNI. I found this one especially helpful:
On the edge of Qt and Java by Maciej Węglarczyk
https://www.qtdeveloperdays.com/sites/default/files/presentation_pdf/MaciejWeglarczyk_Android & iOS_0.pdf
(which I cannot link to, because there are spaces in the link... aargh) and which can be found here
https://www.qtdeveloperdays.com/europe/europe-presentation-listedit:
I just found the slides of the excellent talk by Bogdan Vatra here
http://www.qtdeveloperdays.com/sites/default/files/BogdanVatra_Extending_Qt_Android_Apps_with_JNI.pdf -
wrote on 28 Dec 2014, 03:17 last edited by
Thank you for advices (actually last link is brilliant).
I checked Java interaction and it's seems really easy to integrate Java parts in QT.
One thing still is not clear for me - is it possible to keep and continue Java development for other members involved intros project. Probably it means - can they create Android views and intercept user intercation from that views ?
3/4