ItemLayout QML Type

ItemLayout defines a new size & position of a single Item, for the purposes of specifying layouts. This is to be used within a ConditionalLayout definition. More...

Import Statement: import Lomiri.Layouts 1.0


Detailed Description

Use ItemLayout to define the size and position of a single item within a layout. The item name to be positioned should be specified in item property, which should correspond to the string specified in Layouts.item attached to an Item in the default layout. The Item with Layouts.item attached is reparented into ItemLayout and it is anchor filled to it.


import QtQuick 2.4
import Lomiri.Layouts 0.1

Layouts {
    id: layouts
    layouts: [
        ConditionalLayout {
            when: layouts.width >
            Row {
                width: parent.width
                ItemLayout {
                    item: "input"
                TextArea {
                    text: "extra component"
    // default layout
    TextInput {
        anchors.fill: parent
        text: "input"
        Layouts.item: "input"

Property Documentation

item : string

The property holds the item name to be positioned in the fragment.