[PyKDE] Connect syntax.

Sundance sundance at ierne.eu.org
Thu Sep 23 14:30:18 BST 2004


I heard David Boddie said:

> Can't you achieve this by rebinding connect like you suggested
> before?

Yep, in fact that's what I'm planning to do in a small homemade wrapper 
around PyQt.

> Did I miss that part of the discussion? :-/

Oh, it was just an idea about allowing this syntax:
  someButton.connect(SIGNAL("clicked()"), otherObject.someMethod)

IE, making the first argument implicit when connect() is used as an 
instance method. Which seems a LOT more logical and pythonic. However, 
as Phil points out, it doesn't respect the Qt API.

This can be achieved by fiddling with QObject.connect at wrapper level. 
I don't know how much of a performance impact it has, however.

-- S.




More information about the PyQt mailing list