Exemplo n.º 1
0
    def __init__(self):
        super().__init__()
        self.ui = Ui_Calc()
        self.ui.setupUi(self)

        self.ui.inputSpinBox1.valueChanged.connect(self.result1)
        self.ui.inputSpinBox2.valueChanged.connect(self.result2)
Exemplo n.º 2
0
class MyCalc(QWidget):
	def __init__(self, parent=None):
		super().__init__(parent)
		self.ui = Ui_Calc()
		self.ui.setupUi(self)

	@pyqtSlot(int)
	def on_inputSpinBox1_valueChanged(self, value):
		self.ui.outputWidget.setText(str(value + self.ui.inputSpinBox2.value()))

	@pyqtSlot(int)
	def on_inputSpinBox2_valueChanged(self, value):
		self.ui.outputWidget.setText(str(value + self.ui.inputSpinBox1.value()))
Exemplo n.º 3
0
class MyCalc(QWidget):
    def __init__(self):
        super().__init__()
        self.ui = Ui_Calc()
        self.ui.setupUi(self)

        self.ui.inputSpinBox1.valueChanged.connect(self.result1)
        self.ui.inputSpinBox2.valueChanged.connect(self.result2)

    def result1(self, value):
        self.ui.outputWidget.setText(str(value +
                                         self.ui.inputSpinBox2.value()))

    def result2(self, value):
        self.ui.outputWidget.setText(str(value +
                                         self.ui.inputSpinBox1.value()))
Exemplo n.º 4
0
 def __init__(self, parent=None):
     super().__init__(parent)
     self.ui = Ui_Calc()
     self.resize(250, 150)
     self.ui.setupUi(self)
Exemplo n.º 5
0
 def __init__(self, parent=None):
     super().__init__(parent)
     self.setWindowTitle('calculater')
     self.ui = Ui_Calc()
     self.ui.setupUi(self)