I am attempting to figure out the best way make SIP transfer ownership of
items inside a QList to python.

By default, the generated code for the method which returns the QList
contains this call:

sipConvertFromNewType(sipRes,sipType_QList_0101SomeType,NULL);

Is there a way to specify the transferObj as "Py_None" so we end up with
this instead:

sipConvertFromNewType(sipRes,sipType_QList_0101SomeType,Py_None);

This would cause Py_None to be passed to sipConvertToType (in the generated
converter function) as the transferObj argument and would transfer
ownership of each item in the QList to python as I need.

Of course if there's another preferred way to get this result, I'm glad to
be pointed in the right direction.

Michael
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to