[PyQt] problem with abstract classes

Diez B. Roggisch deets at web.de
Wed Aug 15 23:53:44 BST 2007


Phil Thompson schrieb:
> On Wednesday 15 August 2007 8:57 pm, Diez B. Roggisch wrote:
>> Hi,
>>
>>> Do as Jim said and make sure the declaration of IEventReceiver::OnEvent()
>>> is the same in the .h and .sip files (see attached).
>>>
>>> Also remove the /Abstract/ annotation (for your example at least).
>>> Including it means that "there are *other* abstract functions which I'm
>>> not going to tell you about".
>>>
>>> With the new .sip file I get the following output from running your
>>> test...
>>>
>>> overloaded event: 200
>>> overloaded event: 100
>> thanks to Jim, Giovanno & Phil for solving this. Now the overloading works.
>>
>> However I'm still stucked on the original issue.. and actually pretty
>> much out of my wits.
>>
>> Is there anybody with a mac who could try and reproduce the problem? Of
>> course he/she gets the whole project stuff.
> 
> I can try - but the smaller the test the better.

AAAAAH. Ok. I found it. It turned out to be a prematurely freed object 
instance which must have garbled the pointer.

I could bite my head off right now. Be assured that I'll be back over 
the next few days with some questions regarding that - as the Irrlicht 
engine employs it's own reference counting scheme which I'd love to 
integrate with Pythons - if somehow possible, that is. Which needs some 
research.

I know why I prefer languages with GC over the 
allocation/deallocation-madness of C++...

Thanks a ton for the great help, without the overloading-issues solved I 
would have never come so far!

Regards,

Diez


More information about the PyQt mailing list