[PyKDE] Auto-connecting Slots

Patrick K. O'Brien pobrien at orbtech.com
Sat Jan 28 00:11:55 GMT 2006

Patrick K. O'Brien wrote:
> Andreas Pakulat wrote:
>> then the longer version would IMHO be better as you can directly see
>> which slot is meant. 
> Anything longer than necessary is redundant, imo.
>> BTW: Will this also solve "issues" like the clicked()-signal from
>> QAbstractButton? So I could do 
>> @QtCore.signature("on_mybutton_clicked()")
>> def on_mybutton_clicked(self):
>> and I would get only the call when checked is None and not the 2nd?
> While I think that particular form of the decorator is butt-ugly,
> something like it should definitely be able to deal with all the
> variations that Qt likes to support.

To expand on this a bit, I strongly believe that the use of a decorator
should make the job of the programmer easier, rather than requiring the
programmer to provide enough information to make the writing of the
decorator itself easier.  Python is incredibly easy to introspect.  We
should leverage that to make PyQt more like Python.

Patrick K. O'Brien
Orbtech       http://www.orbtech.com
Schevo        http://www.schevo.org
Louie         http://louie.berlios.de

More information about the PyQt mailing list