[Pygui] signals and slots
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Dec 1 01:00:50 CET 2009
inhahe wrote:
> The reason I like signals and slots so much is that slots is that I
> don't need always need to subclass - I can often create widgets and
> have things respond to them just by making the object in one line and
> then connecting it the next.
I find I hardly ever need to subclass widgets in PyGUI
either, at least not controls.
Usually I *do* create a subclass of Window or Dialog to
act as a container for my controls. I tend to do this
even when it's not strictly necessary, as a convenient
way of organising the code.
Having done that, it's very natural to give it a method
that updates the state of the controls based on the
prevailing conditions, and trigger it with action
properties.
--
Greg
More information about the Pygui
mailing list