-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathone.py
39 lines (33 loc) · 1.11 KB
/
one.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
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'one.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(605, 462)
self.dial = QtWidgets.QDial(Dialog)
self.dial.setGeometry(QtCore.QRect(180, 140, 191, 161))
self.dial.setObjectName("dial")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
self.dial.valueChanged.connect(self.myfun)
Dialog.show()
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
def myfun(self):
print self.dial.value()
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
widget = QWidget(None)
Ui_Dialog().setupUi(widget)
sys.exit(app.exec_())
pass
print "ok"