from PyQt6.QtWidgets import QWidget,QPushButton,QLineEdit,QLabel,QApplication
from PyQt6.QtGui import QPixmap,QIcon,QCursor
from PyQt6.QtCore import Qt
from PyQt6 import QtCore
import sys
class Ui_window(QWidget):
def __init__(self):
super().__init__()
self.resize(400,300)
label_back=QLabel(self)
label_back.resize(400,300)
label_back.setPixmap(QPixmap(r"..\shy.jpg"))
label_back.setScaledContents(True)
line1 = QLineEdit(self)
line1.setPlaceholderText("手机号/邮箱/账号")
line1.resize(150,30)
line1.move(140,100)
line1.setStyleSheet("background-color: transparent;color:white;border: none; border-bottom: 1px solid yellow")
line2 = QLineEdit(self)
line2.setPlaceholderText("密码")
line2.resize(150, 30)
line2.move(140, 150)
line2.setStyleSheet("background-color: transparent;color:white;border: none; border-bottom: 1px solid yellow")
line2.setEchoMode(QLineEdit.EchoMode.Password)
label_title=QLabel("登入",self)
label_title.move(160,30)
label_title.setStyleSheet("font-size: 30px;color:white")
button1 = QPushButton("登入",self)
button1.setGeometry(QtCore.QRect(100,200,200,40))
button1.setStyleSheet("background-color:rgb(66,204,255);color:white;border-radius: 10px;")
label_lock = QLabel(self)
label_lock.resize(30,30)
label_lock.move(100,150)
label_lock.setPixmap(QPixmap(r"..\lock.png"))
label_lock.setScaledContents(True)
label_card = QLabel(self)
label_card.resize(30, 30)
label_card.move(100, 100)
label_card.setPixmap(QPixmap(r"..\card.png"))
label_card.setScaledContents(True)
button2 = QPushButton(self)
button2.move(370,0)
button2.setIcon(QIcon(r"..\Close.png"))
button2.setStyleSheet("background-color: transparent;")
button2.clicked.connect(self.close)
self.setWindowFlag(QtCore.Qt.WindowType.FramelessWindowHint)
if __name__=="__main__":
app=QApplication(sys.argv)
window=Ui_window()
window.show()
sys.exit(app.exec())