On Tue, 08 Sep 2009 10:37:36 -0400, Matt Smith <mel...@orangepalantir.org> wrote: > I am at home using the most recent version of pyqt and sip (20090906) > that I compiled on linux amd64. I am using Qt 4.5.0 that comes with > ubuntu 9.04. The example that I sent does not work because the > "finished()" never gets emitted if I include the 'deleteLater' call. > > I do not have dbus if that makes a difference. > > mbs
It will work if you add QtCore.Qt.DirectConnection to the connect of the finish() signal. A change in the current snapshot is that the proxy that wraps a Python callable to receive a signal is deleted sooner (ie. it doesn't use deleteLater() any more). I'm guessing that this means that it's now being deleted in the same iteration of the event loop that is deleting the thread. However, this shouldn't matter as (I think) the finished() signal should be delivered synchronously and not queued as it appears to be doing. The Qt code that decides whether or not to queue the signal is a bit obscure - it doesn't do the obvious things of comparing thread ids. Phil > On Tue, 2009-09-08 at 08:15 +0100, Phil Thompson wrote: >> On Mon, 07 Sep 2009 20:44:13 -0400, Matt Smith >> <mel...@orangepalantir.org> >> wrote: >> > The long and short, when I use a QThread at the end of my run method, I >> > call self.deleteLater(). If I call self.deleteLater() the "finished()" >> > signal is never emitted. It used to emit "finished()" even if I called >> > deletLate(), and I thought I needed the self.deleteLater() to clean up >> > connections and such. >> > >> > If interested I could easily post an example. If not Ill emit >> > "finished()" before the delete later. >> >> I would need a test case, and to know which versions you are talking >> about. >> >> Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt