[Qt6.7.0] Force light mode has incorrect rendering when system is dark mode
-
wrote on 10 May 2024, 16:30 last edited by
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.
-
You should try with windowsvista style instead the new windows11 style to see if it makes a difference.
wrote on 10 May 2024, 16:45 last edited by Peiqi.Liu 5 Oct 2024, 16:50@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.
-
-
@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.
wrote on 16 Oct 2024, 03:00 last edited byI have the same issue and this code solved it!
1/4