[PyKDE] QCanvas again

Philippe Fremy philippe at yalbi.com
Wed Oct 4 12:39:50 BST 2000


New problem with the QCanvasSprite.

I use the constructor 
QCanvasSprite( QCanvasPixmapArray * array, QCanvas * canvas). 

What qt does with the QCanvasPixampArray is only storing the pointer. This is
ok in C++ but not in Python, because the array gets deleted at the end of my
assigning function.  When I want to show the QCanvasSprite, I get a segfault. 

My workaround was simply to have a global list that holds a reference to all
QCanvasPixmapArray being used. But I think the PyQCanvas should itself
increase the reference count of the array, so that it doesn't get deleted.



More information about the PyQt mailing list