On Wednesday 16 January 2008 09:21:40 Aaron Digulla wrote:
> As for making the API simpler, I'd opt for
>
> button.connectClicked(self.buttonWasClicked)
Wouldn't it be nicer if the signals where attributes of your object,
so that you could write
button.clicked.connect(self.onButtonClicked)
(and likewise for disconnect).
This is basically what C# uses, although there the += and -=
operators are used for connect and disconnect respectively.
To connect one would get:
button.clicked += self.onButtonClicked
I've adopted this notation in my Python programs because I think
it's the most visually appealing.
--
-- Ewald
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt