forked from cxinping/PyQt5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_calc.py
27 lines (17 loc) · 843 Bytes
/
ui_calc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
"""
【简介】信号/槽的装饰器实现方式
"""
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Calc(object):
def setupUi(self, Form):
self.inputSpinBox1 = QtWidgets.QSpinBox(Form)
self.inputSpinBox1.setGeometry(QtCore.QRect(1, 26, 46, 25))
self.inputSpinBox1.setObjectName("inputSpinBox1") # 必须
self.inputSpinBox2 = QtWidgets.QSpinBox(Form)
self.inputSpinBox2.setGeometry(QtCore.QRect(70, 26, 46, 25))
self.inputSpinBox2.setObjectName("inputSpinBox2") # 必须
self.outputWidget = QtWidgets.QLabel(Form)
self.outputWidget.setGeometry(QtCore.QRect(140, 24, 36, 27))
self.outputWidget.setObjectName("outputWidget") # 必须
QtCore.QMetaObject.connectSlotsByName(Form) # 必须