[PyQt] Simple connect error
scorp1us at yahoo.com
Wed Jan 27 06:22:51 GMT 2010
----- Original Message ----
From: Andreas Pakulat <apaku at gmx.de>
To: pyqt at riverbankcomputing.com
Sent: Wed, January 27, 2010 1:17:48 AM
Subject: Re: [PyQt] Simple connect error
On 26.01.10 22:05:41, Jason H wrote:
> class Main(QGraphicsView):
> def __init__(self, useGL=False, parent=None):
> def screenFinished(self):
> print "Main.screenFinished"
> class Screen(QObject):
> finished = pyqtSignal()
> def __init__(self, instanceName, main):
> gives me the error:
> AttributeError: 'Main' object has no attribute 'screenFinished'
I'm not too familiar with the new signal/slot mechanism, but a short
read on the docs suggests that your connect is in the wrong order. Its
usually <bound-signal>.connect(<slot>) and you've got it the other way
Well the Screen object emits "finished" and I want to connect that to the main's screenFinished slot.
self.main.screenfinished is the slot, the self.finished is emitted by the screen class. If I reverse it:
I still get the error.
More information about the PyQt