Derek Fountain wrote:
> I was just looking at the docs for QDialog. For the exec() method it says:
> 
> "Shows the dialog as a modal dialog, blocking until the user closes it. The 
> function returns a DialogCode  result."
> 
> The method actually returns an int, so I need to do a conversion:
> 
>        if (addDialog.exec() == QDialog.DialogCode.Accepted.value()) {
>  
> Is this how it should be? If the method is supposed to return a DialogCode, 
> shouldn't it actually return a DialogCode?

Your code above is correct. This stems from the C++ API where we often 
use integers instead of enums so that the user can extend the return 
values beyond the predefined enum values. The enum values are mere 
predefined values. This is one of those places.

best regards,
Gunnar
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to