[Interest] Native UI on Android (without QtQuick)
Nurmi J-P
jpnurmi at theqtcompany.com
Mon Nov 24 19:35:30 CET 2014
On 24 Nov 2014, at 18:25, Attila Csipa <qt at csipa.in.rs> wrote:
>
>
> 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> 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
>
Well, now it's getting interesting. I think this has a lot of potential. I might give it a spin and play with this stuff at the next hackathon. ;)
--
J-P Nurmi
More information about the Interest
mailing list