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. New to Qt - Layout issues
Qt 6.11 is out! See what's new in the release blog

New to Qt - Layout issues

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 628 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.
  • DriftwoodD Offline
    DriftwoodD Offline
    Driftwood
    wrote on last edited by Driftwood
    #1

    Being new to Qt, I'm having a tough time laying out my form. I put a pic up here of one that I made in Lazarus IDE that shows exactly what I'm trying to do in Qt Designer. If it isn't showing, then here's a link to it: https://imgur.com/pc1ecWD

    The pic shown has a top panel, two panels at either side, and a main panel with two grids on it that's tied to the side panels with splitters. Also note the splitter separating the two grids.

    The best I can do, so far, using frame widgets, is to join one of the side frames to one side of the main frame. But after that, Qt isn't letting me join the other side frame to the main frame.

    I recently read somewhere that the Layout system for Qt was so well thought out that its simplicity cld easily be overlooked. That said, I'll name my next young'un after the one who can help me see what I'm missing. No joke! =)

    alt text

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Anonymous_Banned275
      wrote on last edited by
      #2

      Before you get "RTFM" - it may be wise to post (form) what you have so far.
      After "doing Qt Designer" for about a month - the Qt "simplicity" is in finding the correct Qt terminology.
      From my short experience - I would suggest you find the closest "example" and try to build on that.
      Good luck,

      DriftwoodD 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        From the looks of it, you can achieve what you want with two layouts. One QVBoxLayout for the two table widgets and one QHBoxLayout to put your tree view and the vertical layout in.

        You can also use a QGridLayout with two columns.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        DriftwoodD 1 Reply Last reply
        2
        • SGaistS SGaist

          Hi,

          From the looks of it, you can achieve what you want with two layouts. One QVBoxLayout for the two table widgets and one QHBoxLayout to put your tree view and the vertical layout in.

          You can also use a QGridLayout with two columns.

          DriftwoodD Offline
          DriftwoodD Offline
          Driftwood
          wrote on last edited by Driftwood
          #4

          @SGaist - What a world of difference a few words of encouragement can make. I got the two Tree Widgets and the two grids placed, even with splitters and a Tool panel (frame) at the top. This might not be as bad as I thought it was going to be.

          But, alas, I'm a man of my word. Just send me your first name and little John (or Jane) will get it stamped to their birth cert :D

          My Form: https://i.imgur.com/vrl4rxp.png

          Thank you.

          1 Reply Last reply
          1
          • A Anonymous_Banned275

            Before you get "RTFM" - it may be wise to post (form) what you have so far.
            After "doing Qt Designer" for about a month - the Qt "simplicity" is in finding the correct Qt terminology.
            From my short experience - I would suggest you find the closest "example" and try to build on that.
            Good luck,

            DriftwoodD Offline
            DriftwoodD Offline
            Driftwood
            wrote on last edited by
            #5

            @AnneRanch - Thank you, too.

            A 1 Reply Last reply
            0
            • DriftwoodD Driftwood

              @AnneRanch - Thank you, too.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @Driftwood
              Thanks for kind words, but I really did not contribute much.
              Actually I was hoping for picture of your Qt Designer layout.
              An old (76) gramps advise to you - your offsprings will be THE most valuable "possessions " to you , be wise and kind to even unborn ones.
              As one author once said - the person's name is VERY important to him / her.
              Cheers and back to coding...

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Driftwood said in New to Qt - Layout issues:

                But, alas, I'm a man of my word. Just send me your first name and little John (or Jane) will get it stamped to their birth cert :D

                For the greater good of that human being to come, I won't hold you to that promise ;-)

                Just take the time to choose something wisely :-)

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1

                • Login

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