[Interest] Native UI on Android (without QtQuick)
Attila Csipa
qt at csipa.in.rs
Mon Nov 24 18:25:34 CET 2014
On 11/18/2014 11:37 PM, Ian Monroe wrote:
>
> On Tue, Nov 18, 2014 at 7:13 AM, Attila Csipa <qt at csipa.in.rs
> <mailto:qt at csipa.in.rs>> wrote:
>
>
> 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
>
>
> 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).
>
>
> This could make more sense. You certainly need some more wrapping,
> even if it's at the C++ level. Otherwise why are you using Qt at all?
>
> If you can use QAbstractItemModel with a native Android widget easily,
> then it becomes interesting. C++ is the only thing all platforms -
> WinRT, iOS, Android, win32, Linux - have in common, which is what Qt
> is leveraging of course. Being able to use native UI on the frontend
> while keeping all the business logic in a crossplatform C++ library
> would be an interest trojan-horse way to simplify crossplatform
> development (eg the project managers don't need to know, they can be
> assured that native toolkits are being used.)
Wrapping/interfacing is reasonably easy, I made a bit of
proof-of-concept for wrapping these in QML. No model integration just
yet, but property bindings, signal/slots and JS scripting of those work
just fine. See
http://achipa.blogspot.com/2014/11/qml-wrappers-for-native-android.html
for the (not too gory) details. QAbstractItemModel integration shouldn't
be that difficult either from there on, might do it for kicks for
another blog post.
PS And yes, I still know we have QtQuick.Controls for Android :)
Best regards,
Attila Csipa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141124/1a8e162b/attachment.html>
More information about the Interest
mailing list