Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-7578

Qt Bridge: Support automatic layouts

XMLWordPrintable

      See the attached example project.

       

      Expected generated code (no absolute positioning)

      Rectangle {
          id: frame
          // ...
      
          Row { // Or perhaps RowLayout
              id: frameLayout
              anchors.fill: parent
              spacing: 10
              topPadding: 20
              bottomPadding: 20
              leftPadding: 30
              rightPadding: 30
      
              Rectangle {
                  id: green_Box
                  // ...
              }
      
              Text {
                  id: hello
                  // ...
              }
      
              Rectangle {
                  id: blue_Box
                  // ...
              }
          }
      }
      

       

      Actual generated code (uses absolute positioning)

      Rectangle {
          id: frame
          // ...
      
          Rectangle {
              id: green_Box
              x: 30
              y: 20
              // ...
          }
      
          Text {
              id: hello
              x: 140
              y: 20
              // ...
          }
      
          Rectangle {
              id: blue_Box
              x: 296
              y: 20
              // ...
          }
      }
      

      See also: Layout Grids

        1. figma-row-layout.png
          31 kB
          Sze Howe Koh
        2. LayoutStudy.fig
          15 kB
          Sze Howe Koh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            algerman Aleksei German
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes