def __init__(self, parent, prop, value): QPropertyWidget.__init__(self, parent) self.ui = Ui_PropertyWidget() self.ui.setupUi(self) self.ui.prop.setTextFormat(QtCore.Qt.RichText) self.ui.prop.setText("<b>%s:</b>" % prop) self.ui.value.setText(value)
class PropertyWidget(QPropertyWidget): def __init__(self,parent,prop,value): QPropertyWidget.__init__(self,parent) self.ui = Ui_PropertyWidget() self.ui.setupUi(self) self.ui.prop.setTextFormat(QtCore.Qt.RichText) self.ui.prop.setText("<b>%s:</b>" % prop) self.ui.value.setText(value)