基于pyqt5的登录界面及人脸识别功能界面相互跳转的设计(1)

基于pyqt5的登录界面及人脸识别功能界面相互跳转的设计(1)

这个是登录界面:

在这里插入图片描述部分代码如下:

// An highlighted block
from 文件1 import *
from PyQt5 import QtCore, QtWidgets

class Ui_Dialog3(QtWidgets.QWidget):
    def __init__(self):
        super(Ui_Dialog3, self).__init__()
        self.setupUi(self)
        self.retranslateUi(self)
  #界面的初始化
  def setupUi(self, Dialog3):
        Dialog3.setObjectName("Dialog3")
        Dialog3.resize(1099, 687)
        self.dialog =Dialog3
        Dialog3.setStyleSheet("#Dialog3{border-image:url(./123/222.jpg);}")#背景设置
        self.lineEdit = QtWidgets.QLineEdit(Dialog3)
        self.lineEdit.setGeometry(QtCore.QRect(510, 120, 251, 51))
        self.lineEdit.setObjectName("lineEdit")
        self.lineEdit_2 = QtWidgets.QLineEdit(Dialog3)
        self.lineEdit_2.setGeometry(QtCore.QRect(510, 210, 251, 51))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.lineEdit_2.setEchoMode(QLineEdit.Password)
        self.label = QtWidgets.QLabel(Dialog3)
        self.label.setGeometry(QtCore.QRect(390, 130, 72, 41))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(Dialog3)
        self.label_2.setGeometry(QtCore.QRect(390, 230, 72, 31))
        self.label_2.setObjectName("label_2")
        self.pushButton = QtWidgets.QPushButton(Dialog3)
        self.pushButton.setGeometry(QtCore.QRect(380, 380, 93, 28))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(Dialog3)
        self.pushButton_2.setGeometry(QtCore.QRect(750, 380, 93, 28))
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(Dialog3)
        self.pushButton_3.setGeometry(QtCore.QRect(20, 390, 93, 28))
        self.pushButton_3.setObjectName("pushButton_3")
        self.retranslateUi(Dialog3)
        QtCore.QMetaObject.connectSlotsByName(Dialog3)
    #账号密码的输入
    def lineedit_init(self):
         self.lineEdit.setPlaceholderText(("form1","Please enter your username"))
         self.lineEdit_2.setPlaceholderText(("form1","Please enter your password"))
         self.lineEdit.textChanged.connect(self.check_input_func)
         self.lineEdit_2.textChanged.connect(self.check_input_func)
    #账号密码输入后的判断处理
    def word_get(self):
        login_user = self.lineEdit.text()
        login_password = self.lineEdit_2.text()
        print(login_user, login_password)
        # self.Edit_key.setEchoMode(QLineEdit.Password)
        if login_user == '1' and login_password == '1':
            self.dialog.close()
            Form1= QtWidgets.QDialog()
            ui= Ui_Form1()
            ui.setupUi(Form1)
            Form1.show()
            Form1.exec_()
            self.dialog.show()
            else:
            QMessageBox.warning(self,
                                "警告",
                                "用户名或密码错误!
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值