Important: Please read the Qt Code of Conduct -

Restrict user to change value of a Qradiobutton

  • HI,
    I have customised a qradiobutton to look like an led indicator. It will display a green red image when checked and a green led image when unchecked. Now i want this control to be checked only programmatically and restrict user to change value from the UI. Any help in this regard is greatly appreciated.

  • Moderators

    The easiest would be to disable it i.e. setDisabled(true). By default this grays it out, but since you're customizing the look anyway you might as well do it like that.

Log in to reply