Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qtdesigner: how radio button group together?

Qtdesigner: how radio button group together?

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 6 Posters 67.4k 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.
  • S Offline
    S Offline
    shalongbasi
    wrote on last edited by
    #1

    I am using Qtdesigner for a UI interface. I found that if I use a Qgroupbox to group all Qradiobuttons together, and only Qradiobuttons, they can be selected normally, that mean one is selected and all other are unselected. But if I put Qrabiobuttons into one QgroupBox, and also, there are other stuffs in the same Qgroubox, such as label, lineedit, pushbutton, those radionbuttons cannot be checked exclusively. Is it possible to make them work with different items in the same groupbox?

    1 Reply Last reply
    1
    • musimbateM Offline
      musimbateM Offline
      musimbate
      wrote on last edited by
      #2

      Have you considered arranging QRadioButtons in their groupboxes and then organize your design using layouts?I feel that QGroupBox is there to bundle QRadioButtons and QCheckBoxes together.

      Why join the navy if you can be a pirate?-Steve Jobs

      1 Reply Last reply
      2
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        You can also create a button group explicitly for your radio buttons. Select the ones you want to group, and right click on one of them. Then, you'll find an option to "group" the buttons. If you click that, you will notice that a new QButtonGroup has appeared in your object browser in designer. You can select that button group to give it a name, make it exclusive, etc.

        B K 2 Replies Last reply
        10
        • H Offline
          H Offline
          Hareen Laks
          wrote on last edited by
          #4

          Andre,
          Thanks. It is good to have rating systems for answers as well.

          1 Reply Last reply
          0
          • A andre

            You can also create a button group explicitly for your radio buttons. Select the ones you want to group, and right click on one of them. Then, you'll find an option to "group" the buttons. If you click that, you will notice that a new QButtonGroup has appeared in your object browser in designer. You can select that button group to give it a name, make it exclusive, etc.

            B Offline
            B Offline
            Bharath Ram
            wrote on last edited by
            #5

            @andre I just logged into this old thread to say "Thank you" to Andre for the handy tip.

            1 Reply Last reply
            0
            • JonBJ JonB referenced this topic on
            • A andre

              You can also create a button group explicitly for your radio buttons. Select the ones you want to group, and right click on one of them. Then, you'll find an option to "group" the buttons. If you click that, you will notice that a new QButtonGroup has appeared in your object browser in designer. You can select that button group to give it a name, make it exclusive, etc.

              K Offline
              K Offline
              KaoTD
              wrote on last edited by
              #6

              @andre thanks. it's 2024 now and this tips still work. and it also work with checkboxes too.

              1 Reply Last reply
              0

              • Login

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