Radio button not checkable for users
-
Hello
In a groupbox I have three radiobuttons.
But I want that I can only checked in my program, not with the mouse.
I have no idea how I can do that.
Maybe someone knows how I set it? -
Set a radiobutton from code and set groupbox disabled?
-
The radio buttons and the groupbox can be disabled from code too even if they are placed in the UI using designer.
From a user's point of view, disabling the button is a good idea, as one knows that clicking on the button doesn't have any effect, then. Leaving the buttons enabled, but "eating" the clicks is annoying, at best.
-
Simple example: @QRadioButton *radioButton = new QRadioButton(this); // defined on ui_file.h
radioButton->setEnabled(0);
radioButton->setChecked(1); // or 0 as you like@