def __init__(self, parent): super(ThemeChooser, self).__init__(parent) self.currentIconTheme = QIcon.themeName() self.label = QLabel(self) self.comboBox = QComboBox(self) self.setLayout(QVBoxLayout(self)) self.label.setText('Available themes :') self.layout().addWidget(self.label) self.layout().addWidget(self.comboBox) self.comboBox.currentTextChanged.connect(self.onThemeChanged) self.populateComboBox()
def commit(self): self.currentIconTheme = QIcon.themeName()