[PyKDE] Re: qt4 signals and slots
apaku at gmx.de
Fri Feb 16 16:20:14 GMT 2007
On 16.02.07 16:36:34, Giovanni Bajo wrote:
> On 2/16/2007 3:28 PM, Marcos Dione wrote:
> >>> QtCore.QObject.connect( QtCore.SIGNAL("whateveritscalled()"),
> >>> self.yourSlot)
> >> Er, I get a lot of stacktraces over that line because I always forget the
> >> first argument to SIGNAL:
> >> QtCore.QObject.connect( theobjectemittingthesignal,
> >> QtCore.SIGNAL("whateveritscalled()"), self.yourSlot)
> >> So it's: (The emitter, the signal, the slot).
> > I always wondered why it wasn't:
> > emitter.connect (signal, receiver.slot)
> Because QObject.connect() is a static method (also in C++).
Actually its not. Or at least not only. There's also a member function
connect, but it still takes the sender of the signal. All you can leave
out is the object having the slot.
Your sister swims out to meet troop ships.
More information about the PyQt