Есть в qt designer и pathon окна авторизации и регистрации, нужно написать код чтобы ты сначала ты открываешь окно с авторизацией далее выбираешь регистрацию и вводишь туда данные сохраняешь и вводишь их для авторизации
Файл Registration.py и Authorization.py
Код окна с авторизацией
# Form implementation generated from reading ui file ‘Authorization.ui’
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.


from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_Authorization(object):
def setupUi(self, Authorization):
Authorization.setObjectName(“Authorization”)
Authorization.resize(705, 557)
Authorization.setStyleSheet(“background-color: rgb(0, 196, 255);”)
self.centralwidget = QtWidgets.QWidget(parent=Authorization)
self.centralwidget.setObjectName(“centralwidget”)
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(“gridLayout”)
self.widget = QtWidgets.QWidget(parent=self.centralwidget)
self.widget.setMinimumSize(QtCore.QSize(400, 400))
self.widget.setMaximumSize(QtCore.QSize(400, 400))
self.widget.setStyleSheet(“QWidget {\n”
" background-color: rgb(255, 255, 255);\n"
" border-radius: 15px;\n"
“}\n”
“”)
self.widget.setObjectName(“widget”)
self.widget1 = QtWidgets.QWidget(parent=self.widget)
self.widget1.setGeometry(QtCore.QRect(60, 40, 281, 311))
self.widget1.setObjectName(“widget1”)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget1)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setObjectName(“verticalLayout_2”)
self.label = QtWidgets.QLabel(parent=self.widget1)
self.label.setMinimumSize(QtCore.QSize(50, 49))
self.label.setMaximumSize(QtCore.QSize(16777215, 50))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
font.setItalic(False)
font.setUnderline(False)
font.setWeight(75)
self.label.setFont(font)
self.label.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight)
self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.label.setObjectName(“label”)
self.verticalLayout_2.addWidget(self.label)
self.lineEdit = QtWidgets.QLineEdit(parent=self.widget1)
self.lineEdit.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; /* Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit.setObjectName(“lineEdit”)
self.verticalLayout_2.addWidget(self.lineEdit)
self.lineEdit_2 = QtWidgets.QLineEdit(parent=self.widget1)
self.lineEdit_2.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; / Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit_2.setObjectName(“lineEdit_2”)
self.verticalLayout_2.addWidget(self.lineEdit_2)
self.checkBox = QtWidgets.QCheckBox(parent=self.widget1)
self.checkBox.setStyleSheet(“QCheckBox {\n”
" spacing: 5px; / Отступ между квадратом и текстом /\n"
“}\n”
“\n”
“\n”
“\n”
“\n”
“\n”
“”)
self.checkBox.setObjectName(“checkBox”)
self.verticalLayout_2.addWidget(self.checkBox, 0, QtCore.Qt.AlignmentFlag.AlignHCenter)
self.pushButton = QtWidgets.QPushButton(parent=self.widget1)
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setStyleSheet(“QPushButton {\n”
" color: rgb(255, 255, 255);\n"
" width: 80px;\n"
" height: 30px;\n"
" border-radius: 10px; / Радиус скругления краев /\n"
" background-color: rgb(0, 196, 255); / Фон кнопки /\n"
" }\n"
" \n"
" QPushButton:hover {\n"
" background-color: darkgray; / Фон кнопки при наведении мыши /\n"
" }\n"
" \n"
" QPushButton:pressed {\n"
" background-color: darkgray; / Фон кнопки при нажатии /\n"
" }“)
self.pushButton.setIconSize(QtCore.QSize(16, 16))
self.pushButton.setObjectName(“pushButton”)
self.verticalLayout_2.addWidget(self.pushButton, 0, QtCore.Qt.AlignmentFlag.AlignHCenter)
self.pushButton_2 = QtWidgets.QPushButton(parent=self.widget1)
self.pushButton_2.setStyleSheet(“QPushButton {\n”
” border: none; / Убираем границы /\n"
" background-color: transparent; / Прозрачный фон /\n"
" color: rgb(0, 0, 127); / Синий цвет текста /\n"
" text-align: center; / Текст слева /\n"
" qproperty-icon: url(none); / Убираем иконку (если она есть) /\n"
" qproperty-flat: true; / Убираем 3D-эффект /\n"
" padding: 2px 10px; / Добавляем внутренние отступы /\n"
" font: 10pt “Sans Serif”; / Настраиваем шрифт /\n"
“}\n”
“\n”
“QPushButton:hover {\n”
" text-decoration: underline; / Подчеркивание при наведении /\n"
“}”)
self.pushButton_2.setObjectName(“pushButton_2”)
self.verticalLayout_2.addWidget(self.pushButton_2)
self.pushButton_3 = QtWidgets.QPushButton(parent=self.widget1)
self.pushButton_3.setStyleSheet(“QPushButton {\n”
" border: none; / Убираем границы /\n"
" background-color: transparent; / Прозрачный фон /\n"
" color: rgb(0, 0, 127); / Синий цвет текста /\n"
" text-align: center; / Текст слева /\n"
" qproperty-icon: url(none); / Убираем иконку (если она есть) /\n"
" qproperty-flat: true; / Убираем 3D-эффект /\n"
" padding: 2px 10px; / Добавляем внутренние отступы /\n"
" font: 10pt “Sans Serif”; / Настраиваем шрифт /\n"
“}\n”
“\n”
“QPushButton:hover {\n”
" text-decoration: underline; / Подчеркивание при наведении /\n"
“}”)
self.pushButton_3.setObjectName(“pushButton_3”)
self.verticalLayout_2.addWidget(self.pushButton_3)
self.gridLayout.addWidget(self.widget, 1, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout.addItem(spacerItem1, 1, 2, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.gridLayout.addItem(spacerItem2, 2, 1, 1, 1)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.gridLayout.addItem(spacerItem3, 0, 1, 1, 1)
Authorization.setCentralWidget(self.centralwidget)

self.retranslateUi(Authorization)
QtCore.QMetaObject.connectSlotsByName(Authorization)

def retranslateUi(self, Authorization):
_translate = QtCore.QCoreApplication.translate
Authorization.setWindowTitle(_translate(“Authorization”, “MainWindow”))
self.label.setText(_translate(“Authorization”, “АВТОРИЗАЦИЯ”))
self.lineEdit.setPlaceholderText(_translate(“Authorization”, “Логин”))
self.lineEdit_2.setPlaceholderText(_translate(“Authorization”, “Пароль”))
self.checkBox.setText(_translate(“Authorization”, “запомнить меня на этом компьютере”))
self.pushButton.setText(_translate(“Authorization”, “ВОЙТИ”))
self.pushButton_2.setText(_translate(“Authorization”, “Забыли пароль?”))
self.pushButton_3.setText(_translate(“Authorization”, “Зарегистрироваться”))


if name == “main”:
import sys
app = QtWidgets.QApplication(sys.argv)
Authorization = QtWidgets.QMainWindow()
ui = Ui_Authorization()
ui.setupUi(Authorization)
Authorization.show()
sys.exit(app.exec())
Код с регистрацией
# Form implementation generated from reading ui file ‘Registration.ui’
#
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.


from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_Registration(object):
def setupUi(self, Registration):
Registration.setObjectName(“Registration”)
Registration.resize(444, 430)
Registration.setStyleSheet(“background-color: rgb(0, 196, 255);”)
self.centralwidget = QtWidgets.QWidget(parent=Registration)
self.centralwidget.setObjectName(“centralwidget”)
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(“gridLayout”)
self.widget = QtWidgets.QWidget(parent=self.centralwidget)
self.widget.setMinimumSize(QtCore.QSize(400, 400))
self.widget.setMaximumSize(QtCore.QSize(400, 400))
self.widget.setStyleSheet(“QWidget {\n”
" background-color: rgb(255, 255, 255);\n"
" border-radius: 15px;\n"
“}\n”
“”)
self.widget.setObjectName(“widget”)
self.layoutWidget = QtWidgets.QWidget(parent=self.widget)
self.layoutWidget.setGeometry(QtCore.QRect(60, 40, 281, 311))
self.layoutWidget.setObjectName(“layoutWidget”)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setObjectName(“verticalLayout_2”)
self.label = QtWidgets.QLabel(parent=self.layoutWidget)
self.label.setMinimumSize(QtCore.QSize(50, 49))
self.label.setMaximumSize(QtCore.QSize(16777215, 50))
font = QtGui.QFont()
font.setPointSize(16)
font.setBold(True)
font.setItalic(False)
font.setUnderline(False)
font.setWeight(75)
self.label.setFont(font)
self.label.setLayoutDirection(QtCore.Qt.LayoutDirection.LeftToRight)
self.label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.label.setObjectName(“label”)
self.verticalLayout_2.addWidget(self.label)
self.lineEdit_3 = QtWidgets.QLineEdit(parent=self.layoutWidget)
self.lineEdit_3.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; / Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit_3.setObjectName(“lineEdit_3”)
self.verticalLayout_2.addWidget(self.lineEdit_3)
self.lineEdit = QtWidgets.QLineEdit(parent=self.layoutWidget)
self.lineEdit.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; / Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit.setObjectName(“lineEdit”)
self.verticalLayout_2.addWidget(self.lineEdit)
self.lineEdit_2 = QtWidgets.QLineEdit(parent=self.layoutWidget)
self.lineEdit_2.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; / Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit_2.setObjectName(“lineEdit_2”)
self.verticalLayout_2.addWidget(self.lineEdit_2)
self.lineEdit_4 = QtWidgets.QLineEdit(parent=self.layoutWidget)
self.lineEdit_4.setStyleSheet(“QLineEdit {\n”
" border: 2px solid darkgray;\n"
" border-radius: 15px;\n"
" padding: 0 8px;\n"
" background: white;\n"
" selection-background-color: lightblue;\n"
" width: 30px;\n"
" height: 30px;\n"
“}\n”
“\n”
“QLineEdit:focus {\n”
" border: 2px solid gray; / Цвет границы станет темнее при фокусе /\n"
“}”)
self.lineEdit_4.setObjectName(“lineEdit_4”)
self.verticalLayout_2.addWidget(self.lineEdit_4)
self.pushButton = QtWidgets.QPushButton(parent=self.layoutWidget)
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setStyleSheet(“QPushButton {\n”
" color: rgb(255, 255, 255);\n"
" width: 120px;\n"
" height: 30px;\n"
" border-radius: 10px; / Радиус скругления краев /\n"
" background-color: rgb(0, 196, 255); / Фон кнопки /\n"
" }\n"
" \n"
" QPushButton:hover {\n"
" background-color: darkgray; / Фон кнопки при наведении мыши /\n"
" }\n"
" \n"
" QPushButton:pressed {\n"
" background-color: darkgray; / Фон кнопки при нажатии */\n"
" }")
self.pushButton.setIconSize(QtCore.QSize(16, 16))
self.pushButton.setObjectName(“pushButton”)
self.verticalLayout_2.addWidget(self.pushButton, 0, QtCore.Qt.AlignmentFlag.AlignHCenter)
self.gridLayout.addWidget(self.widget, 1, 1, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout.addItem(spacerItem1, 1, 2, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.gridLayout.addItem(spacerItem2, 2, 1, 1, 1)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.gridLayout.addItem(spacerItem3, 0, 1, 1, 1)
Registration.setCentralWidget(self.centralwidget)

self.retranslateUi(Registration)
QtCore.QMetaObject.connectSlotsByName(Registration)

def retranslateUi(self, Registration):
_translate = QtCore.QCoreApplication.translate
Registration.setWindowTitle(_translate(“Registration”, “MainWindow”))
self.label.setText(_translate(“Registration”, “РЕГИСТРАЦИЯ”))
self.lineEdit_3.setPlaceholderText(_translate(“Registration”, “Электронная почта”))
self.lineEdit.setPlaceholderText(_translate(“Registration”, “Логин”))
self.lineEdit_2.setPlaceholderText(_translate(“Registration”, “Введите пароль”))
self.lineEdit_4.setPlaceholderText(_translate(“Registration”, “Подтвердите пароль”))
self.pushButton.setText(_translate(“Registration”, “СОХРАНИТЬ”))


if name == “main”:
import sys
app = QtWidgets.QApplication(sys.argv)
Registration = QtWidgets.QMainWindow()
ui = Ui_Registration()
ui.setupUi(Registration)
Registration.show()
sys.exit(app.exec())