C

Row QML Type

Positions its children in a row. More...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.0

Properties

Detailed Description

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

The Row automatically positions these items in a horizontal formation.

If an item within a Row 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 row. Also, since a Row automatically positions its children horizontally, a child item within a Row should not set its x position or horizontally anchor itself using the left, right, anchors.horizontalCenter, fill or centerIn anchors. If you need to perform these actions, consider positioning the items without the use of a Row.

Example Usage

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

import QtQuick 2.15

Row {
    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.