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.

Andreas

-- 
Your sister swims out to meet troop ships.

_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to