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?
Forum Updated to NodeBB v4.3 + New Features

Qtdesigner: how radio button group together?

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 6 Posters 67.6k Views 1 Watching
  • 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 6 Feb 2013, 19:26 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
    • M Offline
      M Offline
      musimbate
      wrote on 7 Feb 2013, 07:11 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 7 Feb 2013, 07:27 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 9 Mar 2021, 06:22
        10
        • H Offline
          H Offline
          Hareen Laks
          wrote on 17 Sept 2014, 07:54 last edited by
          #4

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

          1 Reply Last reply
          0
          • A andre
            7 Feb 2013, 07:27

            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 9 Mar 2021, 06:22 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
            • J JonB referenced this topic on 2 Nov 2023, 08:18
            • A andre
              7 Feb 2013, 07:27

              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 3 Apr 2024, 06:40 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