Qt 6.10.2 Android: Qt Quick apps ignore dark mode?
-
Did something break dark mode in Qt Quick recently, either Qt or Android?
On my very up-to-date setup (Qt 6.10.2, Android 16), Qt Creator's
stringlistmodelexample (a simple Qt Quick app) always shows black text on a white background, regardless of whether Android's Settings > Display > Dark mode setting is on or off. It's the same for other (non-color/palette-affecting) example apps that use Qt Quick.By contrast, on the same setup, Qt Creator's
hellotrexample (a simple Qt Widgets app) still respects dark mode, both at startup and if the mode is changed while running.Further info: Our own app, which is programmed to watch for changes to the
Application.styleHints.colorSchemeproperty, still senses the dark-mode transition and adjusts its colors appropriately, but any part of our app that relies on the base application palette still thinks it's in light mode, as if that palette no longer respects that property.I can't imagine what caused this, unless something broke in Qt Quick, because that
colorSchemeproperty still works. Yet, I don't see any complaints online. Am I the only one seeing this?Setup:
- Qt 6.10.2 for Android arm64-v8a, hosted on macOS 15.7.4
- Android 16
- Lenovo Idea Tab TB336FU
- Lenovo ZUI 17.5.10.085 Stable version
-
Update: I was able to work around this by binding a prebuilt
Paletteobject (whose various color property values are all contingent oncolorScheme) to theApplicationWindow'spaletteproperty.That shows that the base palette still works, but not why it's failing to follow
colorSchemeby default (as is the case for Qt Widgets apps on Android or Qt Quick apps on other platforms).