- Fluid Reference Documentation
- Fluid 1.0.0

# AutomaticGrid QML Type

Lay out children in a grid that automatically fits the available space. More...

Import Statement: | import Fluid.Layouts 1.0

- List of all members, including inherited members

## Properties

- cellHeight : real
- cellWidth : real
- delegate : Component
- heightOverride : real
- minColumnSpacing : real
- model : any
- widthOverride : real

## Detailed Description

      import QtQuick 2.10
      import Fluid.Layouts 1.0 as FluidLayouts

      Item {
          width: 600
          height: 600

          FluidLayouts.AutomaticGrid {
              anchors.fill: parent
              cellWidth: 100
              cellHeight: cellWidth
              model: 20

              delegate: Rectangle {
                  id: item
                  height: 100.0 * Math.random()
                  color: Qt.rgba(Math.random(), Math.random(), Math.random(), Math.random())
                  Text {
                      text: index
                  }
              }
          }
      }

## Property Documentation

cellHeight : real

Cell height.

cellWidth : real

Cell width.

[default] delegate : Component

The delegate provides a template defining each item istantiated by the grid.

See also Repeater::delegate.

heightOverride : real

Maximum height.

minColumnSpacing : real

Minimum spacing between columns.

model : any

The model providing data to the grid.

This property can be set to any of the supported data models.

See also Repeater::model.

widthOverride : real

Maximum width.