[PyQt] PyKDE3: how do you start a KIO.TransferJob?

Giacomo Lacava g.lacava at gmail.com
Mon May 26 08:32:18 BST 2008


I'm trying to start a download using the KDE3 api. The following
snippet will bring up the "progress" window, but the actual download
never starts:
job = kio.KIO.get(KURL(url),False,True)
QObject.connect(job,SIGNAL('result( KIO::Job * )'),doSomethingOnResult)

I tried starting it explicitly:
job.start(job.slave())
but I get an error because the object returned by job.slave() is not a
proper Slave.

So I tried building a proper Slave, but I get back a tuple:
>>> kio.KIO.Slave.createSlave(QString('HTTP'),KURL(url))
(None, 3, <qt.QString object at 0xb510712c>)
... and obviously the tuple is not accepted by job.start().

What am I doing wrong?

cheers
-- 
Giacomo Lacava


More information about the PyQt mailing list