[Android-development] QQuickWidget crash when running on Android
maitai at virtual-winds.org
maitai at virtual-winds.org
Wed Jun 4 13:52:03 CEST 2014
Le 04-06-2014 12:11, Paul Olav Tvete a écrit :
> On Wednesday 04 June 2014 11:51:19 maitai at virtual-winds.org wrote:
>> BTW I cannot use QQuickView on Android instead. I am not getting a
>> crash
>> this time, but nothing appears on the screen, and in the console I
>> get:
>>
>> W/Qt (12585): androidjnimain.cpp:542 (void setSurface(JNIEnv*,
>> jobject, jint, jobject, jint, jint)): Can't find surface 2
>>
>> Is QQuickView unsupported on Android too?
>
> QQuickView works when I test it. However, it can be a bit tricky to
> deploy the
> qml and getting the QQuickView to find it if you are not using the
> template
> project from Qt Creator.
>
> The textureprovider example from Qt 5.3.0 uses QQuickView, and it works
> on
> Android. (It's not visible in the example launcher, though.)
>
> - Paul
I tried textureprovider and indeed it works under android. My example is
still not working. I don't think it's a pb of locating the qml file, I
tried both accessing it locally and from a qrc and it finds it as I can
see, just I have this message concerning surface.
I noticed that in textureprovider the application is declared with
QGuiApplication while mine is defined as QApplication (if I declare it
as a QGuiApplication it crashes because of widgets as I understand).
Could it come from that?
-Philippe
More information about the Android-development
mailing list