PageHeadSections QML Type
PageHeadSections is used to configure the sections for a Page. More...
Import Statement: | import Lomiri.Components 1.3 |
Since: | Lomiri.Components 1.1 |
Inherits: |
Properties
- actions : Action
- enabled : bool
- model : var
- selectedIndex : int
Detailed Description
These sections will be shown in the bottom part of the header. This component does not need to be instantiated by the developer, it is automatically part of PageHeadConfiguration.
See also Sections.
Property Documentation
actions : Action |
List of actions that represent the sections. The text of each action is displayed as the section name and clicking a section will update the selectedIndex.
When selectedIndex is changed (by user interaction or by setting the value), actions[selectedIndex] will be triggered.
This property was introduced in Lomiri.Components 1.3.
enabled : bool |
Set this property to false to disable user interaction to change the selected section. Default value: true
model : var |
The input model for the sections. By default model takes the actions as input, but if no trigger functions need to be specified, it can be simplified to a list of strings naming the sections:
import Lomiri.Components 1.3 import QtQuick 2.4 MainView { width: units.gu(50) height: units.gu(80) Page { id: page title: "Sections" head { sections { model: ["one", "two", "three"] } } Label { anchors.centerIn: parent text: "Section " + page.head.sections.selectedIndex } } }
It is strongly recommended to limit the number of sections to two or three.