def apply( self ): """ Applies the scheme to the current application. """ font = self.value('font') try: font.setPointSize(self.value('fontSize')) # errors in linux for some reason except TypeError: pass palette = self.value('colorSet').palette() if ( unwrapVariant(QApplication.instance().property('useScheme')) ): QApplication.instance().setFont(font) QApplication.instance().setPalette(palette) # hack to support MDI Areas for widget in QApplication.topLevelWidgets(): for area in widget.findChildren(QMdiArea): area.setPalette(palette) else: logger.debug('The application doesnt have the useScheme property.')
def apply(self): """ Applies the scheme to the current application. """ font = self.value('font') try: font.setPointSize(self.value('fontSize')) # errors in linux for some reason except TypeError: pass palette = self.value('colorSet').palette() if (unwrapVariant(QApplication.instance().property('useScheme'))): QApplication.instance().setFont(font) QApplication.instance().setPalette(palette) # hack to support MDI Areas for widget in QApplication.topLevelWidgets(): for area in widget.findChildren(QMdiArea): area.setPalette(palette) else: logger.debug('The application doesnt have the useScheme property.')