[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Internal Pointers again... Was: [PyKDE] Model indexes and
From:       "Phil Thompson" <phil () riverbankcomputing ! co ! uk>
Date:       2006-09-19 7:36:31
Message-ID: 39571.195.6.25.120.1158651391.squirrel () river-bank ! demon ! co ! uk
[Download RAW message or body]

> Phil et al:
>
> How much of a lost cause is this?  I ask because I just got bit by
> this bug and ate up nearly a day trying to track down a very nasty seg
> fault.   As Arve said in the original thread, Model-View programming
> is a core of QT and this issue makes it very difficult to successfully
> program this type of system.  I think it is especially relevant to
> PyQT because it is very common to have temporary python wrappers
> hanging around when interfacing with C++ code.
>
> 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.

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic