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. Dynamic grid layout with splitters
QtWS25 Last Chance

Dynamic grid layout with splitters

Scheduled Pinned Locked Moved Unsolved General and Desktop
qsplittergrid
12 Posts 5 Posters 6.5k 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.
  • raven-worxR raven-worx

    @Joel-Bodenmann
    if i got you correctly QMainWindow with QDockWidgets is really close to what you want to achieve

    Joel BodenmannJ Offline
    Joel BodenmannJ Offline
    Joel Bodenmann
    wrote on last edited by
    #3

    @raven-worx Not at all. the QMainWindow only allows me to put but one "row" of widgets around the central widgets. My goal is to have a widget that arranges any number of widgets in any pattern as shown in my diagram, not just one row around a central widget.

    Also I want that to become the central widget of my main window. I am already using the dock widgets for other stuff ;)

    Industrial process automation software: https://simulton.com
    Embedded Graphics & GUI library: https://ugfx.io

    raven-worxR 1 Reply Last reply
    0
    • Joel BodenmannJ Joel Bodenmann

      @raven-worx Not at all. the QMainWindow only allows me to put but one "row" of widgets around the central widgets. My goal is to have a widget that arranges any number of widgets in any pattern as shown in my diagram, not just one row around a central widget.

      Also I want that to become the central widget of my main window. I am already using the dock widgets for other stuff ;)

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

      @Joel-Bodenmann
      ok.
      I am afraid there is no (standard) ready Qt-provided solution for you.
      Either you look for a 3rd party implementation or do it yourself. But i guess that it will be a lot of work.

      --- 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

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

        @Joel-Bodenmann
        ok.
        I am afraid there is no (standard) ready Qt-provided solution for you.
        Either you look for a 3rd party implementation or do it yourself. But i guess that it will be a lot of work.

        Joel BodenmannJ Offline
        Joel BodenmannJ Offline
        Joel Bodenmann
        wrote on last edited by
        #5

        Thank you for your help, I appreciate it.
        This will indeed result in a few nights worth of coding :P

        Industrial process automation software: https://simulton.com
        Embedded Graphics & GUI library: https://ugfx.io

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qtProgrammer
          wrote on last edited by
          #6

          Hello @Joel-Bodenmann ,

          I am interested in your idea, did you ahieve what you wanted.?
          If so, did you use QSplitters.?

          Joel BodenmannJ 1 Reply Last reply
          0
          • Q qtProgrammer

            Hello @Joel-Bodenmann ,

            I am interested in your idea, did you ahieve what you wanted.?
            If so, did you use QSplitters.?

            Joel BodenmannJ Offline
            Joel BodenmannJ Offline
            Joel Bodenmann
            wrote on last edited by Joel Bodenmann
            #7

            @qtProgrammer Please excuse the late reply...

            Yes I managed to get something up and running. It's a basic tiling window manager that uses QSplitter. What I have so far is working. You can put any QWidget at any place and resize the tiles with the mouse. However, drag'n'drop is not even close to finished.
            As it's far from finished and not really well tested I decided not to share it. It's currently collecting dust sitting on my SSD.

            ScreenShot

            Industrial process automation software: https://simulton.com
            Embedded Graphics & GUI library: https://ugfx.io

            R 1 Reply Last reply
            2
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #8

              Hi
              Even if not finished, it would still be super sample of how to use splitters in a clever way :)

              1 Reply Last reply
              2
              • Q Offline
                Q Offline
                qtProgrammer
                wrote on last edited by
                #9

                I'd be interested in that example as well,
                I heard people saying that Splitter is not an alternate to layout but just a container. But a layout is nothing but a container with some nice control over how widgets are laid out. Why not splitter have the same advantage.? After trying to find more info on QSplitter, i can say that there's not much available except the surface level documenation.

                1 Reply Last reply
                0
                • Joel BodenmannJ Joel Bodenmann

                  @qtProgrammer Please excuse the late reply...

                  Yes I managed to get something up and running. It's a basic tiling window manager that uses QSplitter. What I have so far is working. You can put any QWidget at any place and resize the tiles with the mouse. However, drag'n'drop is not even close to finished.
                  As it's far from finished and not really well tested I decided not to share it. It's currently collecting dust sitting on my SSD.

                  ScreenShot

                  R Offline
                  R Offline
                  russQt
                  wrote on last edited by
                  #10

                  @Joel-Bodenmann Hi Joel, however unlikely as it may be, do you still have access to any of this code? Very curious how you implemented splitters inside the QGridLayout. If I understand correctly, you were able to drag widgets in order to expand/de-expand them using the QSplitters?

                  Joel BodenmannJ 1 Reply Last reply
                  0
                  • R russQt

                    @Joel-Bodenmann Hi Joel, however unlikely as it may be, do you still have access to any of this code? Very curious how you implemented splitters inside the QGridLayout. If I understand correctly, you were able to drag widgets in order to expand/de-expand them using the QSplitters?

                    Joel BodenmannJ Offline
                    Joel BodenmannJ Offline
                    Joel Bodenmann
                    wrote on last edited by
                    #11

                    @russQt Well, this has been a long time ago... :D

                    I definitely had this working - I used it with at least some success back then.
                    Unfortunately, I did throw this code/project out last year when performing some housekeeping (getting rid of old stuff).

                    I might still have it around on an old laptop. I'll check in the next few days and report back. But please don't keep your hopes up. Chances are slim.

                    Industrial process automation software: https://simulton.com
                    Embedded Graphics & GUI library: https://ugfx.io

                    1 Reply Last reply
                    1
                    • Joel BodenmannJ Offline
                      Joel BodenmannJ Offline
                      Joel Bodenmann
                      wrote on last edited by
                      #12

                      @russQt I was digging hard but unfortunately I have no positive news for you. Sorry about that.

                      Industrial process automation software: https://simulton.com
                      Embedded Graphics & GUI library: https://ugfx.io

                      1 Reply Last reply
                      1
                      • A aemerzel referenced this topic on

                      • Login

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