[PyQt] Another connect problem

David Boddie david at boddie.org.uk
Thu Oct 1 22:28:03 BST 2009


On Thu Oct 1 20:38:00 BST 2009, Thomas Olsen wrote:

> On Thursday 01 October 2009 20:56:17 Jason H wrote:
> > The C++ code uses new to create an object on the heap, which you must
> >  delete later In python if nothing references the object, it is
> > destroyed. So as soon as __init__ is done, job goes *poof* You need to
> > maintain a reference to it by using self.job = ... so that way the class
> > keeps the job instance around.
>
> I can see that. Tried it and it made no difference. Thanks for the effort
> though.

Does the connect call work? Check to see what value it returns.

Have you also tried to use the new-style connection syntax or the 
fully-qualified signatures in the old-style syntax?

  QObject.connect(job, SIGNAL("data(KIO::Job*, const QByteArray&)"),
                  self.job_received)

David


More information about the PyQt mailing list