示例#1
0
class StringWidget(QValueWidget):
	def __init__(self,parent,label,default):
		QValueWidget.__init__(self,parent)
		self.ui = Ui_ValueWidget()
		self.ui.setupUi(self)
		self.ui.label.setText(label)
		self.ui.valueEdit.setText(default)

	def getValue(self):
		return self.ui.valueEdit.text()
示例#2
0
class StringWidget(QValueWidget):
    def __init__(self, parent, label, default):
        QValueWidget.__init__(self, parent)
        self.ui = Ui_ValueWidget()
        self.ui.setupUi(self)
        self.ui.label.setText(label)
        self.ui.valueEdit.setText(default)

    def getValue(self):
        return self.ui.valueEdit.text()
示例#3
0
class NumberWidget(QValueWidget):
	def __init__(self,parent,label,default):
		QValueWidget.__init__(self,parent)
		self.ui = Ui_ValueWidget()
		self.ui.setupUi(self)
		self.ui.label.setText(label)
		self.ui.valueEdit.setText(default)

		self.validator = QtGui.QDoubleValidator(self)
		self.ui.valueEdit.setValidator(self.validator)

	def getValue(self):
		return float(self.ui.valueEdit.text())
示例#4
0
class NumberWidget(QValueWidget):
    def __init__(self, parent, label, default):
        QValueWidget.__init__(self, parent)
        self.ui = Ui_ValueWidget()
        self.ui.setupUi(self)
        self.ui.label.setText(label)
        self.ui.valueEdit.setText(default)

        self.validator = QtGui.QDoubleValidator(self)
        self.ui.valueEdit.setValidator(self.validator)

    def getValue(self):
        return float(self.ui.valueEdit.text())