If you’re a regular Qt user (like me) and have tried writing Android applications with Qt then you must have come across situations where you’ve needed some very simple capabilities of Android API but it wasn’t present in the Qt library. Displaying a Toast message in Qt for Android is one of those situations. In […]
Qt allows you to use Java code in your Android applications. This is the same code that Android Studio (or Eclipse etc.) users use when they are writing applications for Android. In Qt, by default, you are limited to C++ code and what the Qt modules have to offer (which in most cases are enough) but there […]
I use this method for having simple access to a parent class’ functions in Java. Please note that this is not a recommended method but in case of programs with not much lines of code it becomes really helpful and easy to implement.
Another note to myself which I hope will be useful for others searching it. Add the following lines to your PRO file in Qt, or create a PRI file using the following and include that in your PRO file.
Following slides contain valuable information on Qt, Android and JNI that were presented during Qt Developer Days 2014. How to call a Java function using C++ (Qt) and how to call-back a C++ (Qt) function using Java are described here. Extending your Qt Android application using JNI They’re originally taken from http://www.qtdeveloperdays.com