I am developing an application using python and Qt.
I have designed 2 Main windows ie..QMainWindow (Not QWidget or QDialog) using Qt.
Let it be.
1.
Regardless of your description, I think your LoginWindow should be a QDialog, and your StuffWIndow be the MainWindow, and function like this...
login() method that creates and exec_() your login QDialog as a application MODAL dialogHere is a quick outline:
class MainWindow():
def login():
loginDialog = LoginDialog()
# this is modal. wait for it to close
if loginDialog.exec_():
# dialog was accepted. check its values and maybe:
self.show()
else:
# maybe reshow the login dialog if they rejected it?
loginDialog.exec_()
if __name__ == "__main__":
app = QApp
win = MainWindow()
win.login()
app.exec_()