File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,24 @@ 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 does not have this issue, and looks much nicer in
23+ // general. We only override the specific `windowsvista` style though:
24+ // Other styles don't have this issue, and we do want to retain a
25+ // potential system-wide Qt style setting, especially on Linux.
26+ //
27+ // QStyle::name() is also only available on Qt 6.1 and above.
28+ #if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0)
29+ if (a.style ()->name () == " windowsvista" ) {
30+ QApplication::setStyle (" fusion" );
31+ }
32+ #endif
33+
1634 QCoreApplication::setOrganizationName (QStringLiteral (" Clarius" ));
1735 QCoreApplication::setOrganizationDomain (QStringLiteral (" clarius.com" ));
1836 QCoreApplication::setApplicationName (QStringLiteral (" Solum Demo" ));
You can’t perform that action at this time.
0 commit comments