From e6a11f667dbe232d06c74b0185ec2efa3d59c9a5 Mon Sep 17 00:00:00 2001 From: cristian64 Date: Fri, 17 Apr 2026 21:36:18 +0100 Subject: [PATCH] DolphinQt: Use custom style for `QGroupBox` only with Qt 6.6.0+. This is a follow-up to 3e788399b6f608a270fe0 (#14153), where a custom style for `QGroupBox` widgets was introduced when the Fusion style is used. However, it was overlooked that the custom QSS does not get along well with Qt versions older than 6.6.0; on Windows, Qt 6.5.1 is used. | With Qt 6.5.3 | With Qt 6.11.0 | | ------------- | -------------- | | Dolphin with Qt 6.5.3 | Dolphin with Qt 6.11.0 | Compile checks have been added now to only apply the custom style if Qt 6.6.0 (or newer) is used. --- Source/Core/DolphinQt/Settings.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/DolphinQt/Settings.cpp b/Source/Core/DolphinQt/Settings.cpp index a07c06ba15..80a1d85f20 100644 --- a/Source/Core/DolphinQt/Settings.cpp +++ b/Source/Core/DolphinQt/Settings.cpp @@ -384,6 +384,7 @@ void Settings::ApplyStyle() stylesheet_contents.append(QStringLiteral("%1").arg(tooltip_stylesheet)); } +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) // For Fusion, define group box style if not already defined. if (style_name.compare(QStringLiteral("fusion"), Qt::CaseInsensitive) == 0 && !stylesheet_contents.contains(QStringLiteral("QGroupBox"))) @@ -403,6 +404,7 @@ void Settings::ApplyStyle() " min-width: 0;" "}")); } +#endif qApp->setStyleSheet(stylesheet_contents); }