So you have information outside the dialog that you need for validating the user input inside the dialog?
Can't you simply pass it to the dialog before using it?
Cheers,
_
So you have information outside the dialog that you need for validating the user input inside the dialog?
Can't you simply pass it to the dialog before using it?
Cheers,
_
The dialog-set variables should belong to the dialog. If they have been set OK, pass them outside the dialog and call QDialog::accept(). If they aren't OK, show the error message and return from your accept().
How to "pass them outside" depends on your code. You are using some such method in fact because the "user information are basically stored in the main()-function".
The following link will show you the example with code :
Validate-Data-in-QDialog
Note :
# QDialog::Accepted & QDialog::done(r), don't change/remove "QDIALOG" with your dialog class name, or it will return to infinite loop. Just left it that way
^^
Bookmarks