[PyQt] Another connect problem
Jason H
scorp1us at yahoo.com
Thu Oct 1 19:22:00 BST 2009
job is not a member of the class (self.job) so it gets destroyed.
----- Original Message ----
From: Thomas Olsen <tanghus at gmail.com>
To: pyqt at riverbankcomputing.com
Sent: Thursday, October 1, 2009 2:09:21 PM
Subject: [PyQt] Another connect problem
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
_______________________________________________
PyQt mailing list PyQt at riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list