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.
This commit is contained in:
Miodrag Popović
2019-10-05 22:27:10 +02:00
committed by adityapk00
parent e85b64dfca
commit 06244faa29

View File

@@ -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);
}