[Solved] How to enable/disable Part of the QButtonGroup? Is it possible?
I have a application with three different radio buttons. I added them to a button group like below.
brackets_button_group = new QButtonGroup();
//suppose I have enum BRACKET
This button group is working as intended.
But I need to enable/disable part of the button group according to some value as below.
@if(my_value == 60)
//All buttons should be enabled
else if (my_value < 60)
//button c should be disabled and unchecked
//only c should be checked and enabled
Is there any best practice for doing that, rather than enable/disable each button?
Thanks for reading. :)
Depending on how you manage your my_value variable you could use a QStateMachine to enable/disable your button accordingly. Otherwise no, there's no "partial" button group handling.
Thank you very much SGaist. It was done. :)
Then please update the thread title prepending [solved] so other forum users may know a solution has been found :)