[PyQt] PyQt_PyObject <==> QVariant

Dio Gonzalez dio.gonzalez at pdi.dreamworks.com
Fri Apr 6 23:46:15 BST 2012


I have a very similar scenario as described in the "PyObject to
QVariant and back"  thread:

I used sip to create bindings for several custom classes.  I am
wrapping them as QVariant in python to send them to a C++ class.  The
C++ class receives them as QVariant with the user type
"PyQt_PyObject".  How can I be able to convert that QVariant to the
proper type?

Phil's response to the thread mentioned adding something similar to
%ConvertToTypeCode and %ConvertFromTypeCode.

Thank you,

More information about the PyQt mailing list