Contents

Empty

A list item with no contents. The Empty class can be used for generic list items, containing other components such as buttons. It is selectable, and can take mouse clicks. It will attempt to detect if a thin dividing line at the bottom of the item is suitable, but this behaviour can be over-ridden (using showDivider). For specific types of list items, see its subclasses. More...

Inherited by Base, SingleControl, Standard, and ValueSelector.

Properties

Detailed Description

Examples:

import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
Column {
    ListItem.Empty {
        height: units.gu(6)
        Text {
            text: "Hello world"
            anchors.centerIn: parent
        }
    }
    ListItem.Empty {
        height: units.gu(13)
        Tabs {
            height: parent.height - units.gu(3)
            width: parent.width - units.gu(3)
            anchors.centerIn: parent
            Tab {
                text: "Tab 1"
                page: Label {
                    anchors.centerIn: parent
                    text: "Page one"
                    color: Qt.rgba(0.4, 0.4, 0.4, 1.0)
                }
            }
            Tab {
                text: "Tab 2"
                page: Label {
                    anchors.centerIn: parent
                    text: "Page two"
                    color: Qt.rgba(0.4, 0.4, 0.4, 1.0)
                }
            }
            Tab {
                text: "Tab 3"
                page: Label {
                    anchors.centerIn: parent
                    text: "Page three"
                    color: Qt.rgba(0.4, 0.4, 0.4, 1.0)
                }
            }
        }
    }
}

See the documentation of the derived classes of Empty for more examples. This component is under heavy development.

Property Documentation

action : Action

The property holds the attached action to the list item.


highlightWhenPressed : bool

This documentation is under development and is subject to change.

Highlight the list item when it is pressed. This is used to disable the highlighting of the full list item when custom highlighting needs to be implemented (for example in ListItem.Standard which can have a split).


selected : bool

This documentation is under development and is subject to change.

Specifies whether the list item is selected.


showDivider : bool

This documentation is under development and is subject to change.

Set to show or hide the thin bottom divider line (drawn by the ThinDivider component). This line is shown by default except in cases where this item is the delegate of a ListView.