Search for usage in LXR

org::kde::kirigami::CheckableListItem Class Reference
Inheritance diagram for org::kde::kirigami::CheckableListItem:

Additional Inherited Members

- Properties inherited from org::kde::kirigami::BasicListItem
alias _basicDefault
bool bold
bool fadeContent
var icon
alias iconColor
alias iconSize
alias label
alias labelItem
Item leading
bool leadingFillVertically
real leadingPadding
alias reserveSpaceForIcon
alias reserveSpaceForLabel
bool reserveSpaceForSubtitle
alias subtitle
alias subtitleItem
alias textSpacing
Item trailing
bool trailingFillVertically
real trailingPadding
- Properties inherited from org::kde::kirigami::templates::AbstractListItem
alias _default
QQC2 Action
color activeBackgroundColor
color activeTextColor
color alternateBackgroundColor
bool alternatingBackground
color backgroundColor
alias containsMouse
bool sectionDelegate
bool separatorVisible
bool supportsMouseEvents
color textColor

Detailed Description

A simple subclass of BasicListItem that adds a checkbox on the left side of the layout.

The list item's own checked: property controls the check state of the checkbox.

When the list item or its checkbox is clicked, the QQC2 action specified in the' list item's actions: property will be triggered.

Due to the way BasicListItem works, the QQC2 action MUST contain the line "checked = !checked" as the first line within its "onTriggered:" handler.

Example usage:

import org.kde.kirigami 2.14 as Kirigami
ListView {
id: listView
model: [...]
delegate: Kirigami.CheckableListItem {
label: model.display
checked: model.checked
action: Action {
onTriggered: {
checked = !checked
[ do something amazing ]

Definition at line 47 of file CheckableListItem.qml.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 15 2021 22:39:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.