|
@@ -0,0 +1,34 @@
|
|
|
+from PyQt5.QtWidgets import QDialog
|
|
|
+from PyQt5.QtGui import QImage, QPixmap
|
|
|
+import sys
|
|
|
+from .DigitUI1 import Ui_Digit
|
|
|
+
|
|
|
+import numpy as np
|
|
|
+
|
|
|
+class DigitForm(QDialog):
|
|
|
+ def __init__(self):
|
|
|
+ super(DigitForm, self).__init__()
|
|
|
+ # 加载UI(先设计好)
|
|
|
+ # 创建对象
|
|
|
+ self.ui = Ui_Digit()
|
|
|
+ # 使用setupUi绑定对话框(父窗体)
|
|
|
+ self.ui.setupUi(self)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ def capture_image(self):
|
|
|
+ if (self.ui.lbl_user.toPlainText() == 'yh') & (self.ui.lbl_pwd.toPlainText() == '123') :
|
|
|
+ self.ui.lbl_result.setText('欢迎:' + self.ui.lbl_user.toPlainText())
|
|
|
+ else:
|
|
|
+ self.ui.lbl_result.setText('用户名或者密码错误')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|