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. Elements of the same size in two GroupBoxes
Forum Update on Monday, May 27th 2025

Elements of the same size in two GroupBoxes

Scheduled Pinned Locked Moved Unsolved General and Desktop
qgroupboxqlayoutqtdesigner
7 Posts 3 Posters 2.3k 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
    alan73
    wrote on last edited by
    #1

    I'm trying to exploit constrain so that two elements (owned by two different comboboxes) will have the same size while changing size of the form. It would be good to make with the tools of Qt Creator (Designer).

    These pictures show effect.
    link text
    link text

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! There is no out of the box solution for this with QWidgets. You'll have to write some code to achieve this.

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3
        This post is deleted!
        ? 1 Reply Last reply
        0
        • mrjjM mrjj

          This post is deleted!

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @mrjj Look at the images he posted. I don't think what you suggested is what he wants.

          mrjjM 1 Reply Last reply
          0
          • ? A Former User

            @mrjj Look at the images he posted. I don't think what you suggested is what he wants.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Wieland
            Ok. I cant see them anymore.
            So I removed suggestion.

            ? 1 Reply Last reply
            0
            • mrjjM mrjj

              @Wieland
              Ok. I cant see them anymore.
              So I removed suggestion.

              ? Offline
              ? Offline
              A Former User
              wrote on last edited by A Former User
              #6

              @mrjj It looked like this:

              I think @alan73 wants to have the QLineEdits (one, two) to have the same width.

              mrjjM 1 Reply Last reply
              0
              • ? A Former User

                @mrjj It looked like this:

                I think @alan73 wants to have the QLineEdits (one, two) to have the same width.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #7

                @Wieland
                Ah. thank you.
                Ok, you are right - spacer wont do it.
                He could set Alignment to right. (for edit)
                Then they stay same with all the time.
                Not sure its 100% the wanted effect?
                https://www.dropbox.com/s/px3t6ir6d767nn7/keepright.zip?dl=0

                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