On Tuesday 14 February 2006 4:28 pm, Giovanni Bajo wrote: > Phil Thompson <[EMAIL PROTECTED]> wrote: > > I think this is the way Qt works when the receiver is a child of the > > sender. > > > When PyQt3 makes a connection to a Python callable it creates a proxy > > QObject that is actually connected to the sender. To make sure the proxy > > doesn't leak memory it is made a child of the sender. > > > > If I write a C++ program similar to your test where the receiver is a > > child > > > of the sender then it behaves in the same way. > > > > If I modify the C++ program so that the receiver is not a child of the > > sender, but instead also connects to the sender's destroyed() signal so > > that it can call deleteLater() on itself - then it seems to behave as you > > were expecting. > > > > I'll probably make a change in the next snapshot or so. > > Thanks. But why does it work for QObject and not for QWidget?
I don't know - you'll have to read the code of the QObject dtor. I'm just happy that C++ demonstrates the same behaviour. Phil _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde