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 QtQuick 2.5
8 import "private"
9 import "templates" as T
10 
11 /**
12  * An item delegate Intended to support extra actions obtainable
13  * by uncovering them by dragging away the item with the handle
14  * This acts as a container for normal list items.
15  *
16  * Example usage:
17  * @code
18  * ListView {
19  * model: myModel
20  * delegate: SwipeListItem {
21  * QQC2.Label {
22  * text: model.text
23  * }
24  * actions: [
25  * Action {
26  * icon.name: "document-decrypt"
27  * onTriggered: print("Action 1 clicked")
28  * },
29  * Action {
30  * icon.name: model.action2Icon
31  * onTriggered: //do something
32  * }
33  * ]
34  * }
35  *
36  * }
37  * @endcode
38  * @inherit org::kde::kirigami::templates::SwipeListItem
39  */
40 T.SwipeListItem {
41  id: listItem
42 
43  background: DefaultListItemBackground {}
44 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Aug 17 2022 03:59:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.