PDA

View Full Version : Checkability of checkBox



Salazaar
10th June 2007, 21:02
Hi. I have a few checkboxes, and I want to do that: if one of this checkboxes is checked, others are not checkable. How to do it? I think, that

checkBox->isCheckable(false);
Will be ok. But I have to place them in special function, and call them ofter. Is any other way to do it?

marcel
10th June 2007, 21:10
Why don't you use a QButtonGroup ( with exclusive=on) and radio buttons instead of check boxes. Although I think you can use the "exclusive" functionality of a button group with check boxes also.

Regards

Salazaar
10th June 2007, 21:23
So, if I used QButtonGroup it means that only one button in it can be checked, and if other is checked it automatically unchecks it? And can I design QButtonGroup in Qt Designer?
EDIT:
but QButtonGroup radioButton emits checked() signal, not released(), clicked() or pressed(). And how to set them to be exclusive in designer? And does groupBox have the same 'exclusives'? I mean, when one is checked others aren't checkedRegards