Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15, 6.5, 6.8, 6.9
-
None
Description
When using QT_STYLE_OVERRIDE to change the style on a DE-less Linux system, the style always uses Fusion palette. This is visible even with the builtin windows style (QT_STYLE_OVERRIDE=windows).
A way to solve this I found so far is
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index a11388fdb6f..0d050e8c486 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -368,6 +368,7 @@ void QPlatformThemePrivate::initializeSystemPalette()
{
Q_ASSERT(!systemPalette);
systemPalette = new QPalette(qt_fusionPalette());
+ systemPalette->setResolveMask(0);
}
QPlatformTheme::QPlatformTheme()
which would make the style palette being preferred in https://github.com/qt/qtbase/blob/a72077a88903fe532f6a749677eb4da4ea99f79f/src/widgets/kernel/qapplication.cpp#L1105