[PyQt] QMap and unsigned int

Oliver Heyme olihey at googlemail.com
Fri Nov 27 09:30:43 GMT 2009


Okay, that was easy to fix!

Thanks for the quick reply,
Oli

On Fri, Nov 27, 2009 at 10:22 AM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Fri, 27 Nov 2009 10:08:36 +0100, Oliver Heyme <olihey at googlemail.com>
> wrote:
>> Hej,
>>
>> I am using (on Windows with Qt 4.6_rc) the latest versions of sip and
>> PyQt4.
>>
>> I having some trouble with the QMap.
>> On of my classes has the following method:
>>
>> const QMap<unsigned int,QColor>* materialList() const;
>>
>> When I am using this in the sip-file for the class I get the error:
>>
>> sip: LBBApplication::materialList() unsupported function return type -
>> provide %MethodCode and a C++ signature
>>
>> Weird thing is, if I change the "unsigned int" to "int" it works like a
>> charm.
>> My question is, is there a reason it fails when using "unsigned int"
>> or do I have to do something else?
>
> PyQt doesn't wrap that particular template signature (see qmap.sip). If you
> really need it then you'll have to include it in your own .sip files.
>
> Phil
>


More information about the PyQt mailing list