[PySide] PySide is Dead?
John Ehresman
jpe at wingware.com
Mon Dec 10 18:53:35 CET 2012
On 12/10/12 12:24 PM, Henry Gomersall wrote:
> I suppose my point is that the entirety of Pyside should (in an ideal
> world) be just a list of mappings from C++ types to Python types. The
> heavy lifting should be left for a common tool. You're saying that is
> where the bugs are?
One of the difficult parts about binding Qt or any substantial C or C++
code base is handling object life cycle. In C++, an object allocated on
the heap is alive from the time between when new runs until delete runs
and an object on the stack is alive until it goes out of scope (I'm
simplifying here). In an arbitrary C++ program, there are few rules
than govern when new and delete can be called.
Qt defines some common classes (e.g. QObject) and some rules that govern
when objects are deleted. I'm sure that a large part of the work that
went into PySide was to manage the lifetime and behavior of Python
wrapper objects based on how Qt works. This sort of code is Qt specific
and not generic. Better generic mapping support can help here, but
there will always be Qt specific support (or gtk / GObject specific or
win32 api specific or ...) that needs to be implemented.
Cheers,
John
More information about the PySide
mailing list