Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Radio button not checkable for users
wimschuiteman last edited by
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?
Hostel last edited by
Set a radiobutton from code and set groupbox disabled?
goetz last edited by
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.
Seba84 last edited by
Simple example: @QRadioButton *radioButton = new QRadioButton(this); // defined on ui_file.h
radioButton->setChecked(1); // or 0 as you like@