Reputation: 271
I have a (very rough) GUI created using QT Designer.
Within it there are two radio buttons. When Button A is toggled I would like the check boxes below to be unavailable for use. When A is toggled, I would like to activate them. Is this possible?
I have tried using the signal and slots mode, but I can only find an option to setChecked when B is toggled, not deactivate when A is toggled
Upvotes: 1
Views: 1716
Reputation: 1205
It's quite simple: just connect radio button signal toggled()
with group box's setVisible()
slot.
This will completely hide the checkboxes.
You can also connect toggled()
with every checkbox's setDisabled()
slot just to deactivate them.
Upvotes: 3