In Python 2.4, the signal decorator provides a convenient way of defining the signature of a a slot method or function.

{{{from qt import *

def qt_signal_signature(signature):

}}}

The usage is as follows:

{{{class SignalHandler(object):

}}}

Currently, there is no support in PyQT that could ask for "f.signal" itself, but it would be easy to integrate that into the connect method. It could accept two arguments, a QObject and a method or function and then check if the function carries a "signal" or "slot" attribute. Since current code does not use this signature, this change should not break anything.

PyQtWiki: SignalDecorator (last edited 2009-04-14 07:27:24 by localhost)