I have a simple dialog of type QDialog
. When the uses clicks OK button I want to do some validation before closing the form and returning to caller (main form).
I tried to add in my "CustomDialog.cpp" file the following code:
void CustomDialog::accept(){
// My code...
}
But I get this error:
error: virtual function 'accept' has different calling convention attributes ('void ()') than the function it overrides (which has calling convention 'void () attribute((thiscall))')
What am I doing wrong? Do I need to add something in the CustomDialog.hpp too?