File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ int main(int argc, char *argv[])
1313{
1414 QApplication a (argc, argv);
1515
16+ // When using the default `windowsvista` style on Windows 10 in Dark Mode,
17+ // Qt 6.5.1 renders the labels of disabled QPushButtons with the same
18+ // black color as enabled ones, making it hard to distinguish the two:
19+ //
20+ // https://bugreports.qt.io/browse/QTBUG-115036
21+ //
22+ // The `fusion` style is bundled with Qt as well, does not have this issue,
23+ // and looks much nicer in general. We only override the specific
24+ // `windowsvista` style though: Other styles don't have this issue, and we
25+ // do want to retain a potential system-wide Qt style setting, especially
26+ // on Linux.
27+ //
28+ // QStyle::name() is also only available on Qt 6.1 and above.
29+ #if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
30+ if (a.style ()->name () == " windowsvista" ) {
31+ QApplication::setStyle (" fusion" );
32+ }
33+ #endif
34+
1635 QCoreApplication::setOrganizationName (QStringLiteral (" Clarius" ));
1736 QCoreApplication::setOrganizationDomain (QStringLiteral (" clarius.com" ));
1837 QCoreApplication::setApplicationName (QStringLiteral (" Solum Demo" ));
You can’t perform that action at this time.
0 commit comments