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 : https://www.gitorious.org/camelot/camelot/blobs/master/test/test_qt_bindings.py Cheers, Erik On Mon, Dec 10, 2012 at 7:20 PM, Henry Gomersall <h...@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? > > Cheers, > > Henry > > _______________________________________________ > PySide mailing list > PySide@qt-project.org > http://lists.qt-project.org/mailman/listinfo/pyside >
_______________________________________________ PySide mailing list PySide@qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside