[Interest] Using QAndroidStyle without depending on private headers?

Nikos Chantziaras realnc at gmail.com
Tue Apr 4 14:22:37 CEST 2017


If I don't do:

   QT += widgets-private

in the project file, and then:

   #include <private/qandroidstyle_p.h>
   // ...
   app.setStyle(new QAndroidStyle);

then I'm getting the default style (Fusion, I think) on Android on 
subsequent runs of the application. The android style is only used the 
very first time the application runs. Afterwards, Fusion is used, unless 
the user goes to the Android application information screen and clicks 
on "Clear Data."

Is this normal? I'd like to not depend on private headers.




More information about the Interest mailing list