SIP cannot handle return type
Phil Thompson
phil at riverbankcomputing.com
Fri May 7 09:13:34 BST 2021
On 07/05/2021 09:07, Marian Thomsen wrote:
> Hello,
>
> 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!
You probably need two %MappedTypes, PosPillar* and PositionOfPillars.
Phil
More information about the PyQt
mailing list