[PyQt] PyQt_PyObject <==> QVariant

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


Hello,

I have a very similar scenario as described in the "PyObject to
QVariant and back"  thread:
http://python.6.n6.nabble.com/PyObject-to-QVariant-and-back-td4557574.html

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,
Dio.-


More information about the PyQt mailing list