Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

Deploy Quick Controls with just the Material style



  • Hello. I'm writing a Quick Controls Android application and I only want to deploy the Material style, but Qt Creator is deploying ALL the styles (Fusion, Imagine, Universal, etc). How can I limit it to just the Material style?

    In main.cpp:
    QQuickStyle::setStyle("Material");

    In qtquickcontrols2.conf:

    [Material]
    Theme=...
    Primary=...
    Background=...
    


  • After reading up on Android deployment, I made a custom version of libs.xml that omitted the extra style libs, but they are still getting deployed in the APK.



  • After building the project in Qt Creator, I imported it into Android Studio, deleted the unwanted style libs, rebuilt and deployed from there. The size of the app went from 69.91 MB to 61.39 MB. That's good but surely there must be a way to do it from Qt Creator, no? I tried running the androiddeployqt tool but couldn't get it to work.

    BTW, I upgraded from Qt 5.9 to 5.12 this week. The app size was only 39 MB on Qt 5.9 :(


Log in to reply