[PyQt] Can't declare template attribute with SIP

Phil Thompson phil at riverbankcomputing.com
Mon Sep 1 10:37:16 BST 2008


On Mon, 1 Sep 2008 11:04:49 +0200, "Arve Knudsen" <arve.knudsen at gmail.com>
wrote:
> On Sat, Aug 30, 2008 at 7:23 PM, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> On Mon, 25 Aug 2008 11:58:12 +0200, "Arve Knudsen"
> <arve.knudsen at gmail.com>
>> wrote:
>>> I have a class template (a struct really) which exposes an attribute
>>> variable, but it doesn't appear SIP (version 4.7.8-snapshot-20080817)
>>> supports this. Example:
>>>
>>> template<T>
>>> class Value
>>> {
>>> public:
>>>     T value;
>>> };
>>>
>>> SIP reacts by saying that "T is undefined". Probably an omission in
>>> SIP, since a corresponding getValue works? Also, specifying a concrete
>>> type for the attribute works.
>>
>> Fixed in tonight's snapshot - again, not heavily tested.
> 
> With the last snapshots of both SIP and PyQt and Qt 4.4.1, on Ubuntu
> Gutsy, I get a segfault in PyQt. The problematic frame is
> qtcore_QStringToPyUnicode (qs=0x8309198) at
> sip/QtCore/qstring.sip:594, which calls QString::at with an index
> (parameter 'i') of 491320.

Not a lot I can do without a backtrace or a test case...

Phil



More information about the PyQt mailing list