[PyKDE] QCanvasSprite and QPixmapArray scope issues

Alexander Borghgraef alexander.borghgraef.rma at gmail.com
Fri Apr 28 14:27:09 BST 2006

On 4/28/06, Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> QCanvasSprite does not take responsibility for calling the QPixmapArray
> dtor,
> ie. it doesn't take ownership of the QPixmapArray instance.  Therefore,
> when
> the latter goes out of scope it is garbage collected (unless there is
> another
> reference to it). Your solution is the conventional way of handling it.
> Python isn't C++.

I gathered that :-) Ok, but how about QCanvas? Apparently, the canvas *does*
take ownership of
any item put on it, even though its situation is similar to that of
QCanvasSprite. Or does it just seem
that way, and am I taking horrible risks with the example in my previous
post which for some odd
reason haven't blown up in my face yet?

Alex Borghgraef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060428/7adc0101/attachment.html

More information about the PyQt mailing list