c++ - Canceling an accepted dialog in Qt (aka user error checking) -
I think I'm missing something clearly, but I want to be able to check the error that the user A model when they press 'OK', and let them go back and fix it without closing the dialogue.
Is there anything that I can set within the slot callback of the 'Ok' button which will tell the dialog Close
You can use the method you used to know whether the return value has been rejected or not.
For example:
zero ExDialog :: done (int res) {if (res == QDialog :: Accepted) {// check if it is ok or If not (not) {ShowErrPopUp (); Return; }} QDialog :: done (res); } // When the OK button is clicked on ExDialog :: action_ok_bt_clicked () {it-> Accept (); }
Comments
Post a Comment