keeyias
7th August 2009, 15:21
The problem goes like this,
In an application I am building, I have one instance of LoginDialog inherited from QDialog. This takes username and password, if match is not found in the mysql database, the loginvalidate() returns 0. Return type of loginValidate of LoginDialog is used to determine whether or not to exit the program from the event loop in the main function. If match is found, program flow is as usual, opens the main window.
Now here comes the problem. I have logout button in the QMainWindow inherited class. When it is clicked, private slot, logout() is called, in the logout() slot, i can write close() to close the current instance of QMainWindow, but how can I show to login dialog, Well, making a new object newlogin will help but still, slots in the LoginDialog won't call QMainWindow. What can I do.
THank you in advance.
Keeyias
In an application I am building, I have one instance of LoginDialog inherited from QDialog. This takes username and password, if match is not found in the mysql database, the loginvalidate() returns 0. Return type of loginValidate of LoginDialog is used to determine whether or not to exit the program from the event loop in the main function. If match is found, program flow is as usual, opens the main window.
Now here comes the problem. I have logout button in the QMainWindow inherited class. When it is clicked, private slot, logout() is called, in the logout() slot, i can write close() to close the current instance of QMainWindow, but how can I show to login dialog, Well, making a new object newlogin will help but still, slots in the LoginDialog won't call QMainWindow. What can I do.
THank you in advance.
Keeyias