How to get the button event of the Qmessage box?
If cancel button is clicked, it should reject?? How to reject the process when cancel button is pressed in the message box??
How to get the button event of the Qmessage box?
If cancel button is clicked, it should reject?? How to reject the process when cancel button is pressed in the message box??
please read the documentation of QMessageBox. If you are using static methods, evaluate the return value. if you use exec(), you get the clicked button with "QAbstractButton * clickedButton () const".
the part of "rejecting the process" has nothing to do with qt, that's part of your program logic.
You can QDialog::exec the message box and test for the result:
Qt Code:
To copy to clipboard, switch view to plain text mode
Hope this is useful.
Regards,
Wladek
One second is long, everything longer than two seconds is definitely too long.
Qt Code:
1.To copy to clipboard, switch view to plain text mode
This works fine.
Bookmarks