Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to set a radio button false ?



  • Hi Qties !
    i created a radui button to disable other radio button !

    if (ui->disablerButton->ischecked())
    ui->processbutton1->setchecked(false);

    but when i check the disabler all radiobutton go disbled also

    why ? any suggestions ..thanks



  • @Amine-Djeddi Hi, This is probably due to autoExlusive option.

    From the doc "If auto-exclusivity is enabled, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. In an exclusive button group, only one button can be checked at any time; checking another button automatically unchecks the previously checked one."

    Setting the option to false should resolve your problem



  • @Amine-Djeddi

    In addition to what @Gojir4 said:

    Are your two radiobuttons supposed to be part of the same "radiobutton group" (i.e. exactly one should be"checked"), or are they separate radiobutton groups?


Log in to reply