38 lines
1 KiB
Python
38 lines
1 KiB
Python
from PyQt6.QtWidgets import (
|
|
QWidget,
|
|
QVBoxLayout,
|
|
QLineEdit,
|
|
QPushButton,
|
|
QLabel,
|
|
)
|
|
|
|
|
|
class LoginView(QWidget):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.setWindowTitle("Авторизация")
|
|
|
|
self.layout = QVBoxLayout()
|
|
|
|
self.login_input = QLineEdit()
|
|
self.login_input.setPlaceholderText("Логин")
|
|
|
|
self.password_input = QLineEdit()
|
|
self.password_input.setPlaceholderText("Пароль")
|
|
self.password_input.setEchoMode(
|
|
QLineEdit.EchoMode.Password
|
|
)
|
|
|
|
self.login_button = QPushButton("Войти")
|
|
self.guest_button = QPushButton("Войти как гость")
|
|
self.status_label = QLabel()
|
|
|
|
self.layout.addWidget(self.login_input)
|
|
self.layout.addWidget(self.password_input)
|
|
self.layout.addWidget(self.login_button)
|
|
self.layout.addWidget(self.guest_button)
|
|
self.layout.addWidget(self.status_label)
|
|
|
|
self.setLayout(self.layout)
|
|
|
|
self.setFixedSize(240, 180)
|