From 99bfb1c965f2c7cb8549354396a0cbe8d1a100f6 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Tue, 13 Dec 2022 20:01:18 +0800 Subject: [PATCH] fix: reset style when changed from darkmode to normal --- mainwindow.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mainwindow.cc b/mainwindow.cc index 1fd596d8..c6e8a780 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -63,6 +63,7 @@ #include #include +#include #ifdef HAVE_X11 #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) @@ -1208,9 +1209,9 @@ void MainWindow::applyQtStyleSheet( QString const & displayStyle, QString const } else { - // #ifdef Q_OS_WIN32 - // qApp->setStyle( QStyleFactory::create( "Windows" ) ); - // #endif + #ifdef Q_OS_WIN32 + qApp->setStyle( new QProxyStyle() ); + #endif qApp->setPalette( QPalette() ); }