def updatePropertyListWidget(self, groupName): if groupName == "Python": styles = PythonLexer.styleDescriptions() elif groupName == "Css": styles = CssLexer.styleDescriptions() elif groupName == "Xml": styles = XmlLexer.styleDescriptions() elif groupName == "Html": styles = HtmlLexer.styleDescriptions() self.propertyListWidget.clear() for i in styles: self.propertyListWidget.addItem(i) self.propertyListWidget.setCurrentRow(0)