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. Baffled by Designer - can't add a Splitter
Forum Updated to NodeBB v4.3 + New Features

Baffled by Designer - can't add a Splitter

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
7 Posts 3 Posters 5.3k 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    Here's my Widget design.

    6b4eca09-ed08-40f2-9baa-2b53004620cf-image.png

    All I want is to add a horizontal splitter bar just above the wide label with the gradient half way down.

    I can't set the layout for the widget to Layout Vertically with a Splitter as that's greyed out

    What's the trick please.

    JKSHJ 1 Reply Last reply
    0
    • PerdrixP Perdrix

      Here's my Widget design.

      6b4eca09-ed08-40f2-9baa-2b53004620cf-image.png

      All I want is to add a horizontal splitter bar just above the wide label with the gradient half way down.

      I can't set the layout for the widget to Layout Vertically with a Splitter as that's greyed out

      What's the trick please.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Perdrix said in Baffled by Designer - can't add a Splitter:

      All I want is to add a horizontal splitter bar just above the wide label with the gradient half way down.

      Behind the scenes, a vertical QSplitter is like a QVBoxLayout -- it is a "container" which lets you insert widgets and layouts. The main difference is that the QSplitter automatically places horizontal splitter bars between neighbouring items but a QVBoxLayout does not.

      Here's the trick:

      1. Select your top-level widget and click "Break Layout".
      2. Drag 2 "Vertical Layouts" onto your widget. They will be free-floating at this point.
      3. Take all the items above your wide label with the gradient and put them into the 1st Vertical Layout.
      4. Take all the items below your wide label with the gradient (including the label itself) and put them into the 2nd Vertical Layout.
      5. Select both Vertical Layouts (for example, by pressing Ctrl+A) and click "Lay Out Vertically in Splitter"
      6. Select your top-level widget and click "Lay Out Vertically"

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      S 1 Reply Last reply
      2
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote on last edited by Perdrix
        #3

        Well! That wasn't at all obvious - I think that needs some attention in the UI or the docs.

        David

        JKSHJ 1 Reply Last reply
        0
        • PerdrixP Perdrix

          Well! That wasn't at all obvious - I think that needs some attention in the UI or the docs.

          David

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Perdrix said in Baffled by Designer - can't add a Splitter:

          Well! That wasn't at all obvious - I think that needs some attention in the UI or the docs.

          I agree.

          Would you be willing to post a suggestion at https://bugreports.qt.io/ ?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • PerdrixP Offline
            PerdrixP Offline
            Perdrix
            wrote on last edited by
            #5

            Done it : https://bugreports.qt.io/browse/QTBUG-85306

            1 Reply Last reply
            1
            • PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote on last edited by
              #6

              And was rejected.

              1 Reply Last reply
              0
              • JKSHJ JKSH

                @Perdrix said in Baffled by Designer - can't add a Splitter:

                All I want is to add a horizontal splitter bar just above the wide label with the gradient half way down.

                Behind the scenes, a vertical QSplitter is like a QVBoxLayout -- it is a "container" which lets you insert widgets and layouts. The main difference is that the QSplitter automatically places horizontal splitter bars between neighbouring items but a QVBoxLayout does not.

                Here's the trick:

                1. Select your top-level widget and click "Break Layout".
                2. Drag 2 "Vertical Layouts" onto your widget. They will be free-floating at this point.
                3. Take all the items above your wide label with the gradient and put them into the 1st Vertical Layout.
                4. Take all the items below your wide label with the gradient (including the label itself) and put them into the 2nd Vertical Layout.
                5. Select both Vertical Layouts (for example, by pressing Ctrl+A) and click "Lay Out Vertically in Splitter"
                6. Select your top-level widget and click "Lay Out Vertically"
                S Offline
                S Offline
                selectImagesOfTrafficLights
                wrote on last edited by
                #7

                @JKSH Was facing the same issue, just now and this post saved me a ton of time, thank you!

                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