[PyKDE] Signals and Slots in PyQt4
bazwal at ftml.net
Sun Dec 18 18:33:29 GMT 2005
When disconnecting a signal from a python slot, if the connection has not already been made, it produces the error: 'RuntimeError: Slot hasn't been connected'. However, QObject.disconnect gives a boolean result on success/failure. So is this error really necessary? (With unconnected qt slots, disconnect just returns false).
Also, given that PYSIGNAL has been removed from PyQt4, would it now make sense to support the full SIGNAL/SLOT syntax for python member functions? That is, if MyCustomClass emits a "stuffHappened" signal, should it be possible to connect it to MyCustomClass.handleStuff() like this:
This syntax isn't all sugar. It's also more flexible if the receiver object and the slot can be passed independantly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt