SIP cannot handle return type

Marian Thomsen at
Fri May 7 09:07:49 BST 2021


sip throws the following error because the return type does not exist in python:

new_PosPillar() unsupported function return type - provide %MethodCode and a C++ signature

Code in SipFile:

typedef unsigned short PosPillar;

PosPillar* new_PosPillar (CType& ccobj); <- throwing the error

typedef std::vector<PosPillar*> PositionOfPillars;

Unfortunately I have to use new_PosPillar, it keeps track of the created pointers.

How can I provide MethodCode or anything else (MappedType?) here to get e.g. a wrapped instance that I can pass to the MappedType std:vector and handle the wrapped instance there?

Or is there an easier approach?

Any advice would be appreciated!

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the PyQt mailing list