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. Very dynamic window layout

Very dynamic window layout

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.1k 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.
  • D Offline
    D Offline
    danilo2
    wrote on last edited by
    #1

    Hi! I'm currently using PySide, but If somebody could help me even with C++ code it will be easy movable to Pyside.

    I'm creating an application and one of the main requirements is to create very dynamic layout - the application concist of one empty window, which you can divide however you want, creating "docks" and in each dock there will be displayed a plugin (lets say plugin is some logic and view). It is important that user could move the windows to other docks or create next docks if he wants to.

    I started with simple window with 4 QdockWidgets, but when dragging these widgets I'm not able to place for example 3 of them next to each other (this is of course true, because the dock widgets could be placed on the left or right of "center widget" - but in this application there is no center widget).

    Basically - I'm trying to create application, that will have only DockWidgets, which user can arrange like he wants (for example one big on top and 10 next to each other on the bottom).
    How could be this done in qt?

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

      That's an interesting case.

      I don't know any widget allowing you to do what you want. So one solution would be to have a QGridLayout over your whole parent widget, and play with it and "drag and drop":http://doc.qt.digia.com/stable/dnd.html functionnality.

      The parent grid layout will make sure your widgets don't overlap, and layout properly.

      Adeneo Embedded - www.adeneo-embedded.com

      1 Reply Last reply
      0
      • D Offline
        D Offline
        danilo2
        wrote on last edited by
        #3

        But using grid layout I'm able to place windows only in "grid boxes", so it would be impossible to for example arrange items like (three on top of each other on the left) | (one big o the right).

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Items placed in QGridLayout can have a colspan and rowspan set to >1, so that a single item can occupy a couple of "grid boxes" at a time. So yes, it would be possible.

          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