I have a main window and a dialog window in QT. I want users to login first before proceeding to the main window. Oh yes, the dialog window is my login page.
Can advice on how to proceed. I got a button btnSubmit which connects to a slot called getLoginDetails(). How can i make sure the user has login before proceeding to the main window. When i type this, there is no errors but the Login Form is not appearing.
int main (){
QApplication app(argc, argv);
LoginAccess objLA;
bool status;
status = objLA.getLoginDetails2();
if (status==false){
LoginForm objL;
objL.show();
}else{
mainForm objM;
objM.show();
}
}
You need an application.exec() to start the event loop – even if you are doign a modal dialog first