[PyQt] Signal on Selection in QTreeView
phil at riverbankcomputing.com
Wed Mar 19 10:41:04 GMT 2008
On Wednesday 19 March 2008, you wrote:
> On Mar 18, 2008, at 2:44 PM, Phil Thompson wrote:
> > What makes you say that? The connection has nothing to do with the
> > wrapper
> > object of the emitter.
> The underlying Qt connection stays alive, but on the PyQt side the
> connection goes down making the Qt connection just call the universal
> slot object without being forwarded to python.
> > This should make no difference.
> It does. SIP handles instance methods (and lamba's AFAIR) specifically
> to avoid being dependent on a temporary wrapper object.
> I spent considerable time digging into this (although without knowing
> much about the C API to Python).
> If you still think I'm wrong, I could try digging back and posting
> some source code references.
> In any case, you should be able to reproduce the connection problem at
> your side with the example Kevin posted.
I wasn't aware that Kevin had posted code that would run. He referenced David
Boddie's example which works fine for me.
> FYI, these are my platform specs in case this is somehow platform
> o Mac OS X 10.5.2
> o PyQt-4.3.3, Qt-4.3.3
> o SIP 4.7.3
> o Python-2.5.1 (the built-in version)
The SIP 4.7.4 ChangeLog has the following entry...
2007/12/28 12:31:03 phil
Fixed a bug where PyQt connections from an object owned by C++ were lost when
the Python object was garbage collected.
...which sounds familiar.
More information about the PyQt