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:
committed by
adityapk00
parent
e85b64dfca
commit
06244faa29
@@ -1648,6 +1648,7 @@ void MainWindow::slot_change_theme(const QString& theme_name)
|
|||||||
if (qFile.open(QFile::ReadOnly))
|
if (qFile.open(QFile::ReadOnly))
|
||||||
{
|
{
|
||||||
QString styleSheet = QLatin1String(qFile.readAll());
|
QString styleSheet = QLatin1String(qFile.readAll());
|
||||||
|
this->setStyleSheet(""); // reset styles
|
||||||
this->setStyleSheet(styleSheet);
|
this->setStyleSheet(styleSheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user