[PyQt] Another connect problem

Thomas Olsen tanghus at gmail.com
Thu Oct 1 22:46:39 BST 2009

On 1/10-2009 23:28 David Boddie <david at boddie.org.uk> wrote:
> 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)

I use the style you've quoted above and the call return "True". Tried to read 
the documentation for the new-style syntax but I couldn't really grasp how to 
use it without a working example.

Best Regards / Med venlig hilsen

  Thomas Olsen

More information about the PyQt mailing list