OptionSelector
Component 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
- colourImage : bool (preliminary)
- containerHeight : real (preliminary)
- delegate : Component (preliminary)
- expanded : bool (preliminary)
- model : var (preliminary)
- selectedIndex : int
Signals
- delegateClicked(int index)
Detailed Description
This component is under heavy development.
Examples:
import Components.Components 0.1 Column { width: 250 OptionSelector { text: "Standard" model: ["Value 1", "Value 2", "Value 3", "Value 4"] } OptionSelector { text: "Disabled" model: ["Value 1", "Value 2", "Value 3", "Value 4"] enabled: false } OptionSelector { text: "Expanded" model: ["Value 1", "Value 2", "Value 3", "Value 4"] expanded: true } OptionSelector { text: "Icon" icon: Qt.resolvedUrl("icon.png") values: ["Value 1", "Value 2", "Value 3", "Value 4"] selectedIndex: 2 } OptionSelector { 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
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.
This documentation is under development and is subject to change.
Custom height for list container which allows scrolling inside the selector.
This documentation is under development and is subject to change.
ListView delegate.
This documentation is under development and is subject to change.
Specifies whether the list is always expanded.
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.