# System imports import sys from PyQt5 import QtWidgets from PyQt5.QtCore import pyqtSlot # Helpers and UI imports from ui.main import Ui_main as PrimerForm from ui.pages.loginPage import LoginPage from ui.pages.resetPwdPage import ResetPwdPage # Main app loop class Primer(QtWidgets.QWidget, PrimerForm): def __init__(self, parent=None): super(Primer, self).__init__(parent) self.setupUi(self) # Page Instances ---------------------------------------------> # Login Page 0 self.loginPage = LoginPage() self.loginPageContainer.addWidget(self.loginPage) # Reset Password Page 1 self.resetPwdPage = ResetPwdPage() self.resetPwdPageContainer.addWidget(self.resetPwdPage) # End Page Instances -----------------------------------------> @pyqtSlot(int, name='login_success') def set_page_index(self, index): try: print(index) except Exception as e: print(e) if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) main = Primer() main.show() sys.exit(app.exec_())