[PyKDE] Wrapped classes with sip: how sip/python does handle enums ?
Olivier Tubach
tutu at duboi.com
Thu Dec 16 09:29:07 GMT 2004
Dear all,
I've a class with a public enum:
class Mode
{
public:
enum FileSelectMode { openFolder, openFile, saveFile };
....
};
I've another class which ctor takes this enum as argument:
class FileSelect
{
public:
FileSelect( Mode::FileSelectMode mode );
....
};
I've wrapped the two classes with sip, it builds ok.
I can create in Python a FileSelect like this:
fs = FileSelect( 2 )
How can I use the enum values instead of the numeric value ?
ie: in C++ this would be fs = FileSelect( Mode::openFile );
In python... ?
Thanks for any hints
Regards,
Olivier
More information about the PyQt
mailing list