[PyQt] PyQt_PyObject <==> QVariant

Phil Thompson phil at riverbankcomputing.com
Sat Apr 7 10:00:48 BST 2012

On Fri, 6 Apr 2012 15:46:15 -0700, Dio Gonzalez
<dio.gonzalez at pdi.dreamworks.com> wrote:
> Hello,
> 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.

I haven't changed anything because I never got an answer to my question.


More information about the PyQt mailing list