Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.14.2
-
None
Description
Hello Qt developers,
I have 3 `QRadioButton`'s inside a `QGroupBox`. I understand that they enable auto-exclusive by default.
Now in code, I wish to be able to call a single line `setChecked(true)` of a button to check it. And I wish the other buttons to be automatically unchecked (similar to a user click.)
To be able to do that from code, I must do these:
- Call `setAutoExclusive(false)` on 3 of them.
- Call `setChecked(false)` on 2 of them.
- Call `setChecked(true)` on one of them.
- Call `setAutoExclusive(true)` on 3 of them again.
May I ask if you could make it easier?
I wish to be able to call `setChecked(true)` on one of them, and the rest will be unchecked automatically. Just like a user click.
Apparently, a user click does what I want. But a single call to `setChecked(true)` does nothing.
It's very inefficient.
Thank you for your time,