[PyKDE] QPushButton

Phil Thompson phil at riverbankcomputing.co.uk
Sat Sep 6 11:56:01 BST 2003


On Tuesday 02 September 2003 10:10 am, GuineaPig wrote:
> Hello,
>
> Situation is as follows:
>
> I'm working with pyQt and I have a widget with 40 QPushButtons
> (toggles).  On 'toggled()' the buttons emit a signal to a function.  In
> this function I'd like to find out wich button was pressed.  I'm
> thinking about iterating through all the buttons to check theirs state
> but I can't seem to find how to do this in the docs.  Can someone point
> me in the right direction ?  Should I handle this differently ?

Look at QObject.sender().

Phil




More information about the PyQt mailing list