Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-9178

Excess elements flock in the Grid corner

    XMLWordPrintable

Details

    Description

      If there are more elements created by a Repeater than there is room for in a Grid
      (same for Row and Column?), then the excess items pile up in the top left corner,
      which doesn't seem right (or is it the lesser evil?).

      Rectangle {
          width: 350
          height: 350
      
          Grid {
              columns: 3
              rows: 3
              spacing: 10
              Repeater {
                  model: 15
                  delegate: delegateItem
              }
          }
      
          Component {
              id: delegateItem
              Rectangle {
                  width: 100
                  height: 100
                  color: "blue"
                  opacity: 0.2
                  Text { anchors.centerIn: parent; text: index; font.pixelSize: 30}
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes