PDA

View Full Version : How to uncheck QRadioButton programming(ly)



MIH1406
21st September 2009, 22:56
Hi,

I have tried to uncheck a QRadioButton but I couldn't I used setChecked(flase) but no use.

Is there a way to uncheck it so a group of QRadioButton(s) became unchecked all of them.


Thanks

kwisp
22nd September 2009, 06:56
see
bool autoExclusive () const
void setAutoExclusive ( bool )

MIH1406
23rd September 2009, 21:34
Thank you but this is not the soluation I am looking for.

I have a group of QRadioButton the user shoul chose one of them. And I have a QPushButton named "Reset" this QPushButton shoud reset the group of QRadioButton to uncheck all of them so there is no one checked.

Thanks in advanced

kwisp
24th September 2009, 07:47
may be i do not understand you.


exclusive : bool

This property holds whether the button group is exclusive.

If this property is true then only one button in the group can be checked at any given time. The user can click on any button to check it, and that button will replace the existing one as the checked button in the group.

In an exclusive group, the user cannot uncheck the currently checked button by clicking on it; instead, another button in the group must be clicked to set the new checked button for that group.

By default, this property is true.

Access functions:

bool exclusive () const
void setExclusive ( bool )

kwisp
24th September 2009, 07:55
example:
sorry for not optimized

MIH1406
24th September 2009, 20:41
Yes this is what I am looking for

Thank you,
Mohammad