Kirigami2

controls/SwipeListItem.qml
1 /*
2  * SPDX-FileCopyrightText: 2010 Marco Martin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-or-later
5  */
6 
7 import "private" as P
8 import "templates" as T
9 
10 /**
11  * An item delegate Intended to support extra actions obtainable
12  * by uncovering them by dragging away the item with the handle
13  * This acts as a container for normal list items.
14  *
15  * Example usage:
16  * @code
17  * ListView {
18  * model: myModel
19  * delegate: SwipeListItem {
20  * QQC2.Label {
21  * text: model.text
22  * }
23  * actions: [
24  * Action {
25  * icon.name: "document-decrypt"
26  * onTriggered: print("Action 1 clicked")
27  * },
28  * Action {
29  * icon.name: model.action2Icon
30  * onTriggered: //do something
31  * }
32  * ]
33  * }
34  *
35  * }
36  * @endcode
37  * @inherit org::kde::kirigami::templates::SwipeListItem
38  */
39 T.SwipeListItem {
40  id: listItem
41 
42  background: P.DefaultListItemBackground {}
43 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.