PDA

View Full Version : problem in QRadioButton



wagmare
16th March 2009, 04:22
hi friends,
i am having three radioButtons say "alt", "ctrl" , "del" and the default is alt "checked" ..
when the user try clicks a pushbutton i want to uncheck the alt so i set
alt.setChecked(false)
but it is not working why ... and another thing is i disabled the remaining two radioButton
please help

munna
16th March 2009, 05:12
Since radio buttons present user with one of the many choice, selecting no choice may not possible and therefore setChecked(false) is not working.

spirit
16th March 2009, 06:28
Since radio buttons present user with one of the many choice, selecting no choice may not possible and therefore setChecked(false) is not working.

set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.

munna
16th March 2009, 07:20
set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.

Right. My Bad.

wagmare
16th March 2009, 10:37
set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.

working perfectly ...
alt.setAutoExclusive( false );
alt.setChecked( false );
alt.setAutoExclusive( true );
thank you ...:)