In my Qt5.7 program I have a password security. At some situations I want to ask user for password. I want to do it by separate QDialog. This dialog checks if password are good. And here is a problem. How Can I check from parent Dialog if authorisation was positive?
My dialog:
And code to show dialog:
PasswordGet pass;
pass.setWindowFlags(Qt::MSWindowsFixedSizeDialogHint);
pass.setModal(true);
pass.exec();
To sum up, I want to know if user clicks Cancel (dialog just close), or clicks Authorize (password was good, and dialog close)
How can I do this? I don't want to make new global bool and check from parent dialog if bool == 1, it's not secure.