[Interest] Native UI on Android (without QtQuick)

Attila Csipa qt at csipa.in.rs
Tue Nov 18 16:13:13 CET 2014


HI,

It turns out you can do a fully functional (ie. not a subset) Android UI 
just by using QAndroidExtras and it's QAndroidJNIObject class from C++, 
without ever touching QML or QtQuick. At this point, this is just an 
exercise, for details see

http://achipa.blogspot.com/2014/11/native-ui-in-qt-on-android-without.html

but there are actually some advantages (especially if you have a 
super-simple UI or are dealing with embedded) taking this less-traveled 
path:

Advantages to such a Controls-less approach are:

Full UI functionality available, regardless of Qt version
Styling always latest platform-native
Native UI performance
Smaller APK size (currently at least ~5MB less, potentially ~7MB)
Smaller memory footprint (35MB less for Hello world, more as app 
complexity increases)

Disadvantages:

Not cross-platform
Significantly increased code complexity, especially with more complex UIs
Harder to debug due to dynamic nature and lack of tooling support

Let me know if you have or are aware of a project that would benefit 
from such an approach (or would be interested in, say, a QML-wrapped 
native layer).

Best regards,
Attila



More information about the Interest mailing list