Symbian: Provides a template for creating a ListView delegate. More...
Inherits Item
Inherited by SelectionListItem.
A ListItem does not contain any visible content by default, it has only an invisible padding area to which you can anchor other items. This means all the ListItems in a list can have common margins.

A ListItem with the padding rectangle drawn as white

A ListItem with items anchored to the padding area
The following code snippet implements a ListItem with a text item on the top and subtitle text below. The two items are aligned in a column and they have the standard vertical spacing for a ListItem. The code snippet results a default state list item shown in the list below.
ListItem { id: listItem1 Column { anchors.fill: listItem1.padding ListItemText { id: titleText mode: listItem1.mode role: "Title" text: "Title text" } ListItemText { id: subtitleText mode: listItem1.mode role: "SubTitle" text: "Subtitle text" } } }
A ListItem can have one of the four internal states:




See also ListHeading, ListItemText, and ListView.
enabled : bool |
If true, the user can interact with this list item. If false, the list item is disabled and does nothing when the user selects it. The default value of the property is true.
read-onlymode : string |
The Mode of the ListItem.
This property can be used to create an association between ListItem and ListItemText. This way ListItemText is aware of the internal state of ListItem.
ListItem { id: listItem2 ListItemText { anchors.fill: listItem2.padding role: "Title" mode: listItem2.mode text: "Hello world!" } }
subItemIndicator : bool |
If true, the list item shows a graphical indication that pressing it will show the user another item to select. For example, when the user presses the item, another ListView is shown to the user.
The default value of the property is false.
Note: It is the responsibility of a developer to implement what happens when a ListItem with a subItemIndicator is pressed. This can be done by handling the pressed signal of a ListItem.

ListItem with with a subitem indicator
This signal is emitted when the user presses on the list item for the "long press" period of time. The length of time for a long press is the same as for MouseArea::onPressAndHold() which is currently 800ms.