<div dir="ltr">I am attempting to figure out the best way make SIP transfer ownership of items inside a QList to python.<div><br></div><div style>By default, the generated code for the method which returns the QList contains this call:</div>
<div style><br></div><div style>sipConvertFromNewType(sipRes,sipType_QList_0101SomeType,NULL);<br></div><div style><br></div><div style>Is there a way to specify the transferObj as "Py_None" so we end up with this instead:</div>
<div style><br></div><div style>sipConvertFromNewType(sipRes,sipType_QList_0101SomeType,Py_None);<br></div><div style><br></div><div style>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.</div>
<div style><br></div><div style>Of course if there's another preferred way to get this result, I'm glad to be pointed in the right direction.</div><div style><br></div><div style>Michael</div></div>