ItemSelector

ListItem displaying a single selected value with and optional image and subtext when not expanded, where expanding it opens a listing of all the possible values for selection with an additional option of always being expanded. More...

Properties

Signals

Detailed Description

This component is under heavy development.

Examples:

import Components.Components.ListItems 0.1 as ListItem
Column {
    width: 250
    ListItem.ItemSelector {
        text: "Standard"
        model: ["Value 1", "Value 2", "Value 3", "Value 4"]
    }
    ListItem.ItemSelector {
        text: "Disabled"
        model: ["Value 1", "Value 2", "Value 3", "Value 4"]
        enabled: false
    }
    ListItem.ItemSelector {
        text: "Expanded"
        model: ["Value 1", "Value 2", "Value 3", "Value 4"]
        expanded: true
    }
    ListItem.ItemSelector {
        text: "Icon"
        icon: Qt.resolvedUrl("icon.png")
        values: ["Value 1", "Value 2", "Value 3", "Value 4"]
        selectedIndex: 2
    }
    ListItem.ItemSelector {
        text: i18n.tr("Label")
        model: customModel
        expanded: true
        colourImage: true
        delegate: OptionSelectorDelegate { text: name; subText: description; icon: image }
    }
    ListModel {
        id: customModel
        ListElement { name: "Name 1"; description: "Description 1"; image: "images.png" }
        ListElement { name: "Name 2"; description: "Description 2"; image: "images.png" }
        ListElement { name: "Name 3"; description: "Description 3"; image: "images.png" }
        ListElement { name: "Name 4"; description: "Description 4"; image: "images.png" }
    }
}

Property Documentation

colourImage : bool

This documentation is under development and is subject to change.

Colours image according to the fieldText colour of the theme, otherwise source colour is maintained.


containerHeight : real

This documentation is under development and is subject to change.

Custom height for list container which allows scrolling inside the selector.


delegate : Component

This documentation is under development and is subject to change.

ListView delegate.


expanded : bool

This documentation is under development and is subject to change.

Specifies whether the list is always expanded.


model : var

This documentation is under development and is subject to change.

The list of values that will be shown under the label text. This is a model.


selectedIndex : int

The index of the currently selected element in our list.


Signal Documentation

ItemSelector::delegateClicked(int index)

Called when delegate is clicked.