Or to call accept() or reject().
Usually one would do that instead of the OnOk and OnCancel slots, i.e. connect the OK button to accept() and the Cancel button to reject(), overwriting either method if something special needs to be done there (like checking for valid values).
Also one would usually use QDialogButtonBox to provide the buttons, in order to make sure that button order is correct on the platform the program runs on.
Cheers,
_
Bookmarks