質問編集履歴
1
サンプル提示
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,3 +41,135 @@
|
|
41
41
|
きるかと思うのですが、pythonでの書き方がわからずにいます。
|
42
42
|
|
43
43
|
ご教授お願い致します。
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
下記、サンプルソースを記載いたします。
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
```python
|
52
|
+
|
53
|
+
from PyQt5 import QtCore, QtGui, QtWidgets
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
class Ui_Form(object):
|
58
|
+
|
59
|
+
def setupUi(self, Form):
|
60
|
+
|
61
|
+
Form.setObjectName("Form")
|
62
|
+
|
63
|
+
Form.resize(187, 300)
|
64
|
+
|
65
|
+
self.lineEdit_1 = QtWidgets.QLineEdit(Form)
|
66
|
+
|
67
|
+
self.lineEdit_1.setGeometry(QtCore.QRect(40, 30, 113, 20))
|
68
|
+
|
69
|
+
self.lineEdit_1.setObjectName("lineEdit_1")
|
70
|
+
|
71
|
+
self.lineEdit_2 = QtWidgets.QLineEdit(Form)
|
72
|
+
|
73
|
+
self.lineEdit_2.setGeometry(QtCore.QRect(40, 50, 113, 20))
|
74
|
+
|
75
|
+
self.lineEdit_2.setObjectName("lineEdit_2")
|
76
|
+
|
77
|
+
self.lineEdit_3 = QtWidgets.QLineEdit(Form)
|
78
|
+
|
79
|
+
self.lineEdit_3.setGeometry(QtCore.QRect(40, 70, 113, 20))
|
80
|
+
|
81
|
+
self.lineEdit_3.setObjectName("lineEdit_3")
|
82
|
+
|
83
|
+
self.lineEdit_4 = QtWidgets.QLineEdit(Form)
|
84
|
+
|
85
|
+
self.lineEdit_4.setGeometry(QtCore.QRect(40, 90, 113, 20))
|
86
|
+
|
87
|
+
self.lineEdit_4.setObjectName("lineEdit_4")
|
88
|
+
|
89
|
+
self.lineEdit_5 = QtWidgets.QLineEdit(Form)
|
90
|
+
|
91
|
+
self.lineEdit_5.setGeometry(QtCore.QRect(40, 110, 113, 20))
|
92
|
+
|
93
|
+
self.lineEdit_5.setObjectName("lineEdit_5")
|
94
|
+
|
95
|
+
self.lineEdit_6 = QtWidgets.QLineEdit(Form)
|
96
|
+
|
97
|
+
self.lineEdit_6.setGeometry(QtCore.QRect(40, 130, 113, 20))
|
98
|
+
|
99
|
+
self.lineEdit_6.setObjectName("lineEdit_6")
|
100
|
+
|
101
|
+
self.lineEdit_7 = QtWidgets.QLineEdit(Form)
|
102
|
+
|
103
|
+
self.lineEdit_7.setGeometry(QtCore.QRect(40, 150, 113, 20))
|
104
|
+
|
105
|
+
self.lineEdit_7.setObjectName("lineEdit_7")
|
106
|
+
|
107
|
+
self.lineEdit_8 = QtWidgets.QLineEdit(Form)
|
108
|
+
|
109
|
+
self.lineEdit_8.setGeometry(QtCore.QRect(40, 170, 113, 20))
|
110
|
+
|
111
|
+
self.lineEdit_8.setObjectName("lineEdit_8")
|
112
|
+
|
113
|
+
self.lineEdit_9 = QtWidgets.QLineEdit(Form)
|
114
|
+
|
115
|
+
self.lineEdit_9.setGeometry(QtCore.QRect(40, 190, 113, 20))
|
116
|
+
|
117
|
+
self.lineEdit_9.setObjectName("lineEdit_9")
|
118
|
+
|
119
|
+
self.lineEdit_10 = QtWidgets.QLineEdit(Form)
|
120
|
+
|
121
|
+
self.lineEdit_10.setGeometry(QtCore.QRect(40, 210, 113, 20))
|
122
|
+
|
123
|
+
self.lineEdit_10.setObjectName("lineEdit_10")
|
124
|
+
|
125
|
+
self.lineEdit_11 = QtWidgets.QLineEdit(Form)
|
126
|
+
|
127
|
+
self.lineEdit_11.setGeometry(QtCore.QRect(40, 230, 113, 20))
|
128
|
+
|
129
|
+
self.lineEdit_11.setObjectName("lineEdit_11")
|
130
|
+
|
131
|
+
self.lineEdit_12 = QtWidgets.QLineEdit(Form)
|
132
|
+
|
133
|
+
self.lineEdit_12.setGeometry(QtCore.QRect(40, 250, 113, 20))
|
134
|
+
|
135
|
+
self.lineEdit_12.setObjectName("lineEdit_12")
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
self.retranslateUi(Form)
|
140
|
+
|
141
|
+
QtCore.QMetaObject.connectSlotsByName(Form)
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
def retranslateUi(self, Form):
|
146
|
+
|
147
|
+
_translate = QtCore.QCoreApplication.translate
|
148
|
+
|
149
|
+
Form.setWindowTitle(_translate("Form", "Form"))
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
if __name__ == "__main__":
|
156
|
+
|
157
|
+
import sys
|
158
|
+
|
159
|
+
app = QtWidgets.QApplication(sys.argv)
|
160
|
+
|
161
|
+
Form = QtWidgets.QWidget()
|
162
|
+
|
163
|
+
ui = Ui_Form()
|
164
|
+
|
165
|
+
ui.setupUi(Form)
|
166
|
+
|
167
|
+
Form.show()
|
168
|
+
|
169
|
+
sys.exit(app.exec_())
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
```
|