def set_dark_style(self): f = QFile(Resource.darkstyle) if not f.exists(): LOGGER.error( "Unable to load dark stylesheet, file not found in resources") return else: f.open(QFile.ReadOnly | QFile.Text) ts = QTextStream(f) stylesheet = ts.readAll() self.setStyleSheet(stylesheet) KnechtSettings.app['app_style'] = 'fusion-dark' IconRsc.update_icons(self.ui) self.setStyle('Fusion')
def set_default_style(self): self.setStyleSheet(None) KnechtSettings.app['app_style'] = 'windowsvista' IconRsc.update_icons(self.ui) self.setStyle('windowsvista')