[PySide] PySide is Dead?
Erik.Janssens at conceptive.be
Mon Dec 10 21:32:06 CET 2012
I can give some comments on this, as I have studied
in detail how PyQt behaves.
The main problem is, on one side you have Python with :
- reference counting
- garbage collector
On the other side, there is Qt with :
- parent/child memory management
- cross thread signals/slot relations
And you need to 'merge' these 4 concepts in the bindings.
This is notoriously difficult, and has a lot of edge cases.
I believe PyQt handles all of them correctly, but only after
years of tweaking the code.
This is also why it's not straightforward to use existing
binding tools such as SWIG or Cython to 'wrap' Qt objects
and make them available in Python.
To make PySide succeed, this behaviour is the most
important part to be documented ! It should be possible
for anyone to review what happens in what case and why.
Over the years, I have assembled some unit tests that
check some of the edge cases :
On Mon, Dec 10, 2012 at 7:20 PM, Henry Gomersall <heng at cantab.net> wrote:
> On Mon, 2012-12-10 at 12:53 -0500, John Ehresman wrote:
> > 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.
> Can you give me an example of the problem here? I mean, is the issue
> that the binding code needs to keep track of when (say) a QObject is
> deleted (in which case does QObjectCleanupHandler not provide that
> support) or is it that the bindings _should_ be deleting objects based
> on some documented rules?
> PySide mailing list
> PySide at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide