Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.0
-
None
Description
My application MKVToolNix uses Qt 6.5.0 with Fusion style on Windows. I've now had several users report that on their installation MKVToolNix was not using the dark palette on startup even though they have Windows 11's app mode set to "dark". I've confirmed with them that the corresponding registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme is indeed set to 0.
Furthermore this isn't a bug in MKVToolNix as it can be reproduced with one of Qt's example applications. I've taken the widgets/lineedits example, added QApplication::setStyle(QString::fromUtf8("Fusion")); in main.cpp before the app is created, and the resulting exe is using the light palette for the affected users (see the attached main.cpp) as well.
I've confirmed with those users that they don't have any Qt-related environment variables set (e.g. QT_QPA_PLATFORM, QT_QPA_PLATFORMTHEME, QT_STYLE_OVERRIDE are all unset) & that there are no additional command-line options as observed by dumping argv directly in main before creating the QGuiApplication).
Unfortunately I myself cannot reproduce the behavior on my own Windows 11 22H2 installation: both my own MKVToolNix as well as the lineedits.exe use the dark palette if my Windows 11's app color mode is set to "dark".
How can I debug this further? What kind of information can I ask my users to provide?