PDA

View Full Version : Programatically setting radio buttons



Doug Broadwell
25th May 2007, 03:21
I have an architecture where changes to a group of radio buttons calls a validation function which returns which radio button should then be checked (not necessarily the one the user clicked). I use "setChecked( TRUE/FALSE )" on the buttons to change them to the state they should be in but it doesn't work, the radio buttons stay in the state they were "clicked" on.

Is there some sort of "repaint" function I need to call?

Thanks,
Doug

marcel
25th May 2007, 07:42
Have you tried toggle() instead?
Are your buttons in a QButtonGroup? Because if they are, then they are auto exclusive by default, and checking one button, affects the others.

Regards

Doug Broadwell
25th May 2007, 21:55
Thanks.

It turns out my problem was logic errors elsewhere.

Doug