Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.14.0
-
None
-
Qt 5.14.0 (arm64-v8a kit)
macOS Catalina
android-ndk-r20b
Android Build SDK: android-26
Description
I'm trying to set Flat style for my QtQuick.Controls v1 components. Here how I do that in main.cpp:
#include <QGuiApplication> #include <QQmlApplicationEngine> int main(int argc, char *argv[]) { qputenv("QT_QUICK_CONTROLS_1_STYLE", "Flat"); qputenv("QT_LABS_CONTROLS_STYLE", "Flat"); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(QStringLiteral("qrc:/main.qml")); QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); return app.exec(); }
It does work on Desktop (macOS) as expected, but it doesn't work on Android. "Base" and "Desktop" styles also work as expected on both Desktop and Android platforms. I put an example project below alongside with the full debug output of it. I can't see any unusual error messages in the debug output though
I xample.flattes: Late-enabling -Xcheck:jni I libthemeutils: Theme: libthemeutil.so load success I Perf : Connecting to perf service. W System : ClassLoader referenced unknown path: I QtCore : Start I Qt : qt started I Adreno : QUALCOMM build : 2c6a1c7, I1490fecf6e I Adreno : Build Date : 02/04/19 I Adreno : OpenGL ES Shader Compiler Version: EV031.25.03.02 I Adreno : Local Branch : I Adreno : Remote Branch : I Adreno : Remote Branch : I Adreno : Reconstruct Branch : I Adreno : Build Config : S L 6.0.7 AArch64 D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace. I Adreno : PFP: 0x005ff112, ME: 0x005ff066 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 I ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 I OpenGLRenderer: Initialized EGL, version 1.4 D OpenGLRenderer: Swap behavior 2 D vndksupport: Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace. D vndksupport: Loading /vendor/lib64/hw/gralloc.msm8998.so from current namespace instead of sphal namespace
This bug might be relevant to QTBUG-46886