Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Can mainwindow be the password input window ? what problems will it have?



  • i am using mainwindow to be the password input window, when login success, mainwindow hide, shows another window.
    I wonder if this kind of design will bring some problems in the furture or not. Can anyone help, thanks.


  • Lifetime Qt Champion

    Hi and welcome to the forums
    That should not be an issue using a main window for login even normally a QDialog class
    would been used. However, since you do not seems to need the modal feature of QDialog, then
    using a main window should be perfectly fine.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    As @mrjj wrote, it should not get you any problem. However, the question would rather be why use a QMainWindow for such a task ? It's not really the correct tool.


Log in to reply