From 06244faa29bb84f1636a94ebda29f2638c08b7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miodrag=20Popovi=C4=87?= Date: Sat, 5 Oct 2019 22:27:10 +0200 Subject: [PATCH] style sheet reset (#190) Style sheet reset before the theme change makes all widgets styles update without restart requirement. Tested on a fork (Safecoin Qt wallet), but it should work for you as well. --- src/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 240b492..6f2e492 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1648,6 +1648,7 @@ void MainWindow::slot_change_theme(const QString& theme_name) if (qFile.open(QFile::ReadOnly)) { QString styleSheet = QLatin1String(qFile.readAll()); + this->setStyleSheet(""); // reset styles this->setStyleSheet(styleSheet); }