[SIP] TypeError: unable to convert a C++ Class::ScopedEnum instance to a Python object

Denis Rouzaud <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAMtsY+Z4V6CPp69Gkg1b1AmmsQyv4zZi+TYGYYdNcb0aRcuDpg@mail.gmail.com>
Hi list,

I have a scoped enum in a class, a signal emitting this enum.

So something like

MyClass
{
  public:
    enum class MyEnum
    {
    .....
    };

   signals:
        void mySignal( MyEnum enum );
}


If in Python, I do:

def slot( enum ):
  print( enum );
myClassInstance.mySignal.connect(slot)

I get this error:
TypeError: unable to convert a C++ MyClass::MyEnum instance to a Python
object


Any idea how to solve this?

Cheers,
Denis

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.