[Qt6.7.0] Force light mode has incorrect rendering when system is dark mode
Solved
General and Desktop
-
I update Qt from 6.6.1 to 6.7.0 via vcpkg, I sadly found that my program was automatically switched to dark mode, but I'm not ready to do this. So I forced Qt to switch to bright color mode:
qputenv("QT_QPA_PLATFORM", "windows:darkmode=0");
So, the interface has become like this:
The dropdown menu of
QComboBox
is very strange
Perhaps there are more rendering issues. Did I forget to set any options or miss something?
-
You should try with windowsvista style instead the new windows11 style to see if it makes a difference.
-
@Christian-Ehrlicher Thank you. Done.
qApp->setStyle("windowsvista");
Finally, Qt has added the Win11 style! However, it seems there are still some minor issues. It's really exciting to expect QWidget to have a more modern interface.
-