[PyKDE] Re: Internal Pointers again... Was: Model indexes and
internal pointers
Mike Rovner
mrovner at cadence.com
Tue Sep 19 23:18:42 BST 2006
Phil Thompson wrote:
>> In my case I have wrappers around a scene graph (a tree structure for
>> computer graphics). Anytime I call through to C++ and ask the tree
>> nodes for children or parents, I get a python wrapper back. This
>> wrapper is referencing a ref-counted class on the C++ side, but it is
>> unique as far as python is concerned. So when I put this into
>> internalPointer to retrieve later it immediately goes out of scope in
>> python and is invalid when I try to reference it later.
>>
>> If there is any way to make this work I think it would greatly improve
>> PyQT.
>
> It isn't technically possible - unless somebody has a bright idea.
PyQt can return new wrapper every time but all of them pointing to the
same C++ object, can it?
/m
More information about the PyQt
mailing list