It looks like you're new here. If you want to get involved, click one of these buttons!
Looks like QDialog::DialogCode values are not bound into Python.
Yes, that's right.
The problem is basically that these constants are not enums. The Qt API is translated automatically by a (complex) script. It cannot deduce the need for these constants from the class interface. So these constants are skipped.
For now, I can only offer to use 1 for Accepted and 0 for Rejected.
May be exec()/exec_() should return Boolean value? In C++ code result of QDialog::exec() would be compared with QDialog::DialogCode.
In the Qt API this is an "int", not a bool. And it's not an enum, hence the Qt translation script does not recognize it as an QDialog::DialogCode enum and omits definitions for the latter.