mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Avoid Qt 6.7 bug when using windows11 style
Still not fixed in 6.7.3 (https://bugreports.qt.io/browse/QTBUG-124150)
This commit is contained in:
@@ -56,6 +56,12 @@
|
||||
|
||||
#include <gsl/gsl_errno.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if QT_VERSION > 0x060700
|
||||
#include <QStyleFactory>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// bootstrap state
|
||||
//
|
||||
@@ -429,6 +435,15 @@ main(int argc, char *argv[])
|
||||
// create the application -- only ever ONE regardless of restarts
|
||||
application = new QApplication(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if QT_VERSION > 0x060700
|
||||
if (application->style()->name() == "windows11") {
|
||||
application->setStyle(QStyleFactory::create("Windows"));
|
||||
qDebug()<<"Replacing windows11 by Windows style to avoid a Qt bug";
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//XXXIdleEventFilter idleFilter;
|
||||
//XXXapplication->installEventFilter(&idleFilter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user