[PyQt] [SIP] TypeError: unable to convert a C++ Class::ScopedEnum instance to a Python object
Denis Rouzaud
denis.rouzaud at gmail.com
Wed Oct 2 07:48:42 BST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20191002/d7de741a/attachment.html>
More information about the PyQt
mailing list