[Android-development] QAndroidStyle and qt 5.4.0

maitai at virtual-winds.org maitai at virtual-winds.org
Thu Dec 11 20:41:14 CET 2014


Thanks for your reply,

I have tried many sample projects from qt just to be sure it doesn't 
come from mine. For instance Examples/Qt-5.4/widgets/widgets/sliders 
just looks bad (compiled and run out of the box without any change). I 
have uninstall ministro just to make sure it does not interfere, no 
luck. Also tried various android API targets, from 19 to 21, and many 
other desperate ideas...

I will try again tomorrow with a brand new app with just a QPushButton 
and a clean device concerning ministro.

I'm using Android for armeabi-v7a (GCC 4.8, Qt 5.4.0)/Samsung Galaxy 
S4/Android 4.4.2

At least it's good to know it should work :)

Philippe.

Le 11-12-2014 20:06, Nurmi J-P a écrit :
>> On 11 Dec 2014, at 19:48, maitai at virtual-winds.org wrote:
>> 
>> All my hopes were based on this announcement:
>> 
>> http://blog.qt.digia.com/blog/2014/12/03/native-android-style-in-qt-5-4/
>> 
>> Where you can read:
>> 
>> In other words, Qt Widgets applications will look native regardless of 
>> the deployment method; system wide or bundled Qt libraries.
>> 
>> 
>> 
>> Le 11-12-2014 19:42, Harri Pasanen a écrit :
>> 
>>> I too get in startup lots of them ClassNotFoundExceptions related to 
>>> styling.
>>> I think those can be ignored, even if they are a bit annoying.
>>> 
>>> Qt 5.4 announcement only talks about native styling for Qt Quick 
>>> controls, I suppose you are looking for something more?
>>> 
>>> Harri
>>> 
>>> On 11/12/2014 19:18, maitai at virtual-winds.org wrote:
>>>> Still struggling with this... I tried to remove ministro, to set 
>>>> some
>>>> variable, to change the style in the manifest, and many other things 
>>>> :(
>>>> 
>>>> I always get this in the console, and I suppose it's dead:
>>>> 
>>>> W/System.err( 8785): java.lang.ClassNotFoundException:
>>>> android.graphics.drawable.RippleDrawable
>>>> W/System.err( 8785): 	at java.lang.Class.classForName(Native Method)
>>>> W/System.err( 8785): 	at java.lang.Class.forName(Class.java:251)
>>>> W/System.err( 8785): 	at java.lang.Class.forName(Class.java:216)
>>>> W/System.err( 8785): 	at
>>>> org.qtproject.qt5.android.ExtractStyle.getClass(ExtractStyle.java:396)
>>>> W/System.err( 8785): 	at
>>>> org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:100)
>>>> W/System.err( 8785): 	at
>>>> org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:438)
>>>> 
>>>> and many more lines...
>>>> 
>>>> Switching back to 5.3.2...
>>>> 
>>>> Thanks anyway
>>>> Philippe.
>>>> 
>>>> 
>>>> 
>>>> Le 11-12-2014 14:46, maitai at virtual-winds.org a écrit :
>>>> 
>>>> Still puzzled on that one... Tried some qt examples, also no 
>>>> android-styled widget there... Am I missing something obvious? I had 
>>>> qandroidstyle more or less ok in 5.3.2 through ministro, I thought 
>>>> that would be incorporated in 5.4 even without Ministro.
>>>> 
>>>> Quote from qt-blog:
>>>> 
>>>> 
>>>> In Qt 5.4, selected parts of Ministro source code have been 
>>>> incorporated into the Android platform plugin of Qt. This makes it 
>>>> possible for Qt applications to look native without Ministro, even 
>>>> though applications wishing to use services provided by Ministro 
>>>> will continue to do so. In other words, Qt Widgets applications will 
>>>> look native regardless of the deployment method; system wide or 
>>>> bundled Qt libraries.
>>>> 
>>>> 
>>>> Any help welcomed :)
>>>> 
>>>> Le 10-12-2014 20:08,
>>>> maitai at virtual-winds.org
>>>>  a écrit :
>>>> > Hello,
>>>> >
>>>> > I just installed and tried qt5.4 for android. I thought that
>>>> > QAndroidStyle (through QStyleFactory) would become available even if the
>>>> > application is not deployed with ministro, as read here:
>>>> >
>>>> >
>>>> http://blog.qt.digia.com/blog/2014/12/03/native-android-style-in-qt-5-4/
>>>> 
>>>> >
>>>> > But there is no "android" style available in QStyleFactory and our app
>>>> > (QWidget based) just looks ugly... I tried fusion and also not to load
>>>> > any style, same mess.
>>>> >
>>>> > Is there something I should do/call to make androidstyle available in
>>>> > 5.4 without ministro?
>>>> >
> 
> Hi,
> 
> I'm using Qt 5.4.0, Qt Creator 3.3.0, and Nexus 5. If I create a "Qt
> Widgets Application" in Qt Creator, throw in a QPushButton on the
> form, and run the app, it uses the Android style. I didn't touch the
> default deployment method which is "Bundle Qt libraries in APK" by
> default, and I don't actually even have Ministro installed. I don't
> know what goes wrong with your app (tried uninstalling the app?) but
> I'd encourage to try such minimal test case first. It takes 10s to
> create the minimal app and it provides a nice clean plate. If that
> doesn't work, then we might have a bigger problem. I hope this is just
> some weirdness related to switching between the deployment methods
> and/or having old style extraction data around.
> 
> PS. The exceptions are unfortunate but harmless noise.
> 
> --
> J-P Nurmi
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development



More information about the Android-development mailing list