PyQT 4.6.2 question about radiobuttons

Phil Thompson phil at riverbankcomputing.com
Thu Jan 14 16:32:04 EST 2010


On Thu, 14 Jan 2010 22:09:20 +0100, News123 <news123 at free.fr> wrote:
> Hi,
> 
> As you wll notice: I don't have a lot of GUI and only very litte
> PyQT-experience.
> 
> 
> I have a UI created with qt designer.
> 
> The UI contains a few named radio buttons in a button group.
> ( for example radioButton_one to radioButton_four )
> 
> 
> I am unable locate a signal, that is fired whenever one of the
> radiobuttons in a group have been changed.
> 
> 
> however what I am able to is to connect the same slot to all
> of the clicked events of a buttongroup
> 
> 
> buttons = [
> win.radioButton_one,
> win.radioButton_two,
> win.radioButton_three,
> win.radioButton_four
> ]
> 
> for button in buttons:
>     button.cloicked.connect( self._mymethod )
> 
> 
> My questions are:
> 
> 1.) Is there a signal in the buttongroup, that would fire?

QButtonGroup.buttonClicked()

> 2.) if not. What is the easiest way to get a list of all radiobuttons
> belonging to a buttongroup

QButtonGroup.buttons()

> Thanks in advance for your any suggestions good pointers

http://www.riverbankcomputing.com/static/Docs/PyQt4/html/qbuttongroup.html

Phil



More information about the Python-list mailing list