[PyQt] Another connect problem
Thomas Olsen
tanghus at gmail.com
Thu Oct 1 19:09:21 BST 2009
Hi
This is actually PyKDE4 related but the list seems to be dead.
I am trying to connect a KIO.TransferJob[1] to a method in my class but must
be doing something wrong. A very stripped down version of my class looks like
this:
from PyKDE4.kdecore import *
from PyKDE4.kio import *
class MyClass():
def __init__(self):
job = KIO.get(KUrl("http://somesite.com"))
QObject.connect(job, SIGNAL("data(Job*, const QByteArray&)"),
self.job_received)
def job_received(self, job, data):
print "Data received: " + data
But job_received is never called. I know I should be using the new-style
connect but I haven't really grasped it yet...
[1] http://api.kde.org/pykde-4.3-api/kio/KIO.TransferJob.html
--
Best Regards / Med venlig hilsen
Thomas Olsen
More information about the PyQt
mailing list