QT: Keep dialog alive after error in onAccepted()
Well, here I am again and not finding how I can get what I want:
I have (for example) a login dialog; it runs fine and does what it is supposed to do, except:
If a user logs on with wrong credentials, how can I keep this window alive? When the onAccepted() is triggered, the window is closed, no matter what. Would/should I have to execute the window again, as in this->exec()?
It seems a bit recursive to me... So, I was hoping I could find a property that would abort the deletion of the window; so I can clear the LineEdit for password and set focus on it... just what a user would expect to happen.
On success the window should close of course, as well as on the cancel button.
|