[PyKDE] Re: qt4 signals and slots

Marcos Dione mdione at grulic.org.ar
Fri Feb 16 14:28:08 GMT 2007


On Fri, Feb 16, 2007 at 03:16:38AM -0600, Dave Fancella 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)

-- 
(Not so) Random fortune:
The doctor talks to the patient: "Well, we had an unexpected turn of events
during your autopsy."




More information about the PyQt mailing list