Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to set a radio button false ?
Qt 6.11 is out! See what's new in the release blog

How to set a radio button false ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amine Djeddi
    wrote on last edited by
    #1

    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

    Gojir4G JonBJ 2 Replies Last reply
    0
    • A Amine Djeddi

      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

      Gojir4G Offline
      Gojir4G Offline
      Gojir4
      wrote on last edited by
      #2

      @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

      1 Reply Last reply
      1
      • A Amine Djeddi

        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

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #3

        @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?

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved