Android development with QML and C++ for back-end



  • Is it possible to use QML for UI and C++ for business rules in android projects?
    It is necessary to manipulate java code?



  • Hej.
    Its perfectly possbile to use QML for GUI and C++ classes for logic.

    Here is a really short video that seems to be a nice start:
    link text



  • @Qojote said:

    Hej.
    Its perfectly possbile to use QML for GUI and C++ classes for logic.

    Here is a really short video that seems to be a nice start:
    link text

    But in the video the author is building for Desktop device. This applies to android applications? Once between android and Qt Java there.



  • Creating Qt apps for android devices is quite easy and (almost) similar to desktop development. Thats the point in using Qt, to run the same application on several platforms. But maybe i misunderstood what your usecase? What do you mean with "Qt Java"? You can use native java classes to add special functionality to your app, but normally you are just fine with Qt/C++ Code.



  • @Qojote said:

    What do you mean with "Qt Java"?

    I meant that C ++ / Qt is not the native android technology, among them there is java. So I thought it would be different.



  • As long as you just use Qt classes the code can be crosscompiled for your target system, as for example android. Qt Creator and the toolchains do all the work to translate the C++ code for the target. For android a .apk is generated. You do not need to worry about the underlying structure (which maybe creates java code orbinary code or bitcode or whatever). And if you need some really special functionality within your app, you can integrate native java code.



  • No, one does not need to use Qt classes. Just about any C++ or C can do for the business logic, but Qt-derived classes would be the glue between QML and those.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.