C

Column QML Type

Positions its children in a column. More...

Import Statement: import QtQuick .
Since: Qt Quick Ultralite 1.0

Properties

Detailed Description

Column is a type that positions its child items along a single column. It can be used as a convenient way to vertically position a series of items without using anchors.

The Column automatically positions these items in a vertical formation.

If an item within a Column is not visible, or if it has a width or height of 0, the item will not be laid out and it will not be visible within the column. Also, since a Column automatically positions its children vertically, a child item within a Column should not set its y position or vertically anchor itself using the top, bottom, anchors.verticalCenter, fill or centerIn anchors. If you need to perform these actions, consider positioning the items without the use of a Column.

Example Usage

Below is a Column that contains three rectangles of various sizes:

Column {
    spacing: 2

    Rectangle { color: "red"; width: 50; height: 50 }
    Rectangle { color: "green"; width: 20; height: 50 }
    Rectangle { color: "blue"; width: 50; height: 20 }
}

Property Documentation

padding : real

This property hold the padding around the content.


spacing : real

The spacing is the amount in pixels left empty between adjacent items. The default spacing is 0.


Available under certain Qt licenses.
Find out more.