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. Pair label buddy to button group
Forum Updated to NodeBB v4.3 + New Features

Pair label buddy to button group

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 3 Posters 2.7k Views 2 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.
  • P Offline
    P Offline
    primem0ver
    wrote on last edited by
    #1

    Is this possible? I have paired all the rest of the labels on my UI with a specific object but there is one label that should be paired with a group because their are two radio buttons that represent options for the label.

    raven-worxR 1 Reply Last reply
    0
    • P primem0ver

      Is this possible? I have paired all the rest of the labels on my UI with a specific object but there is one label that should be paired with a group because their are two radio buttons that represent options for the label.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @primem0ver
      Why, just why?
      First, QButtonGroup is not a QWidget.
      Second, what is the sense of this at all? I mean a label transfers the focus on shortcut activation to it's buddy. So where would it be transfered in the case of a group? If you expect it to be the first button, then set the first button as a buddy. Simple as that.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      P 1 Reply Last reply
      2
      • artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #3

        I agree with @raven-worx - set one of the buttons in the group as a buddy, user can then easily make change with keyboard arrows.

        For more information please re-read.

        Kind Regards,
        Artur

        1 Reply Last reply
        0
        • raven-worxR raven-worx

          @primem0ver
          Why, just why?
          First, QButtonGroup is not a QWidget.
          Second, what is the sense of this at all? I mean a label transfers the focus on shortcut activation to it's buddy. So where would it be transfered in the case of a group? If you expect it to be the first button, then set the first button as a buddy. Simple as that.

          P Offline
          P Offline
          primem0ver
          wrote on last edited by
          #4

          @raven-worx said in Pair label buddy to button group:

          Why, just why?

          Maybe because I am rather new to Qt Designer and its features. In the past i have done most of my layouts etc using code and I am trying to familiarize myself with the Designer's features and how they work. Is that ok with you?

          raven-worxR artwawA 2 Replies Last reply
          0
          • P primem0ver

            @raven-worx said in Pair label buddy to button group:

            Why, just why?

            Maybe because I am rather new to Qt Designer and its features. In the past i have done most of my layouts etc using code and I am trying to familiarize myself with the Designer's features and how they work. Is that ok with you?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @primem0ver said in Pair label buddy to button group:

            Is that ok with you?

            for me yes, of course.
            I just assumed when you are using a feature, that you checked what it is actually doing.
            I neither do want to be offending nor be rude, but the docs say it clearly what it does and why it doesn't make sense.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            P 1 Reply Last reply
            0
            • P primem0ver

              @raven-worx said in Pair label buddy to button group:

              Why, just why?

              Maybe because I am rather new to Qt Designer and its features. In the past i have done most of my layouts etc using code and I am trying to familiarize myself with the Designer's features and how they work. Is that ok with you?

              artwawA Offline
              artwawA Offline
              artwaw
              wrote on last edited by
              #6

              @primem0ver Ok, so when you look into QLabel docs you can see that buddy has to be QWidget or descendant where QButtonGroup inherits QObject.

              For more information please re-read.

              Kind Regards,
              Artur

              1 Reply Last reply
              0
              • raven-worxR raven-worx

                @primem0ver said in Pair label buddy to button group:

                Is that ok with you?

                for me yes, of course.
                I just assumed when you are using a feature, that you checked what it is actually doing.
                I neither do want to be offending nor be rude, but the docs say it clearly what it does and why it doesn't make sense.

                P Offline
                P Offline
                primem0ver
                wrote on last edited by
                #7

                @raven-worx
                That is fine. However, in general when I approach something new I don't make any assumptions about how it is supposed to work. I can only rely on experience that I have had with other tools.

                I was using the Qt Designer help to figure out how it works. It does mention that it connects labels to Widgets. However I tried creating a group-box widget and I couldn't link the label to it. Hence the question.

                Your solution works from a practical perspective, especially since the second option will not always be available but I like to work from a "conceptual" perspective when designing things (if that makes sense).

                raven-worxR 1 Reply Last reply
                0
                • P primem0ver

                  @raven-worx
                  That is fine. However, in general when I approach something new I don't make any assumptions about how it is supposed to work. I can only rely on experience that I have had with other tools.

                  I was using the Qt Designer help to figure out how it works. It does mention that it connects labels to Widgets. However I tried creating a group-box widget and I couldn't link the label to it. Hence the question.

                  Your solution works from a practical perspective, especially since the second option will not always be available but I like to work from a "conceptual" perspective when designing things (if that makes sense).

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #8

                  @primem0ver said in Pair label buddy to button group:

                  However I tried creating a group-box widget and I couldn't link the label to it. Hence the question.

                  The first question and the topic title refers to a button group (QButtonGroup), not a QGroupBox.

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    primem0ver
                    wrote on last edited by
                    #9

                    Correct. The button group was the next possibility that occurred to me. Perhaps I could have checked to see if it was a Widget first. I probably should have worded the question differently since I wasn't specifically interested in the class itself, simply the set of buttons that I wanted to group together.

                    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