[PyQt] How to derive from a %MappedType?
srhaque at theiet.org
Sun Jan 22 18:11:58 GMT 2017
Hah, I had not realised I could use templated classes like
that...thanks for the tip!
On 22 January 2017 at 18:03, Phil Thompson <phil at riverbankcomputing.com> wrote:
> On 22 Jan 2017, at 4:26 pm, Shaheed Haque <srhaque at theiet.org> wrote:
>> So, since SIP only supports templates via %MappedTypes
> No it supports class templates as well.
>> I guess there
>> is there any way to express the relationship
>> class Foo: TemplatedType<whatever>
>> Omitting the base would presumably "hide" any methods etc. that the
>> templated type might have contributed to the API of Foo...am I right
>> in thinking that the only option is to omit the base and add to Foo
>> anything which is needed?
> No, using a class template rather than a mapped type template might be appropriate. See the attached.
More information about the PyQt