def __init__(self, parent, label, default): QBoolWidget.__init__(self, parent) self.ui = Ui_BoolWidget() self.ui.setupUi(self) self.ui.checkBox.setText(label) if default == "True": self.ui.checkBox.setChecked(True) else: self.ui.checkBox.setChecked(False)
class BoolWidget(QBoolWidget): def __init__(self,parent,label,default): QBoolWidget.__init__(self,parent) self.ui = Ui_BoolWidget() self.ui.setupUi(self) self.ui.checkBox.setText(label) if default == "True": self.ui.checkBox.setChecked(True) else: self.ui.checkBox.setChecked(False) def getValue(self): return self.ui.checkBox.isChecked()
class BoolWidget(QBoolWidget): def __init__(self, parent, label, default): QBoolWidget.__init__(self, parent) self.ui = Ui_BoolWidget() self.ui.setupUi(self) self.ui.checkBox.setText(label) if default == "True": self.ui.checkBox.setChecked(True) else: self.ui.checkBox.setChecked(False) def getValue(self): return self.ui.checkBox.isChecked()
def __init__(self,parent,label,default): QBoolWidget.__init__(self,parent) self.ui = Ui_BoolWidget() self.ui.setupUi(self) self.ui.checkBox.setText(label) if default == "True": self.ui.checkBox.setChecked(True) else: self.ui.checkBox.setChecked(False)