Files
RedBear-OS/local/recipes/kde/kirigami/source/examples/applicationitemapp/main.qml
T
2026-04-14 10:51:06 +01:00

64 lines
1.5 KiB
QML

/*
* SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick
import org.kde.kirigami as Kirigami
Kirigami.ApplicationItem {
id: root
globalDrawer: Kirigami.GlobalDrawer {
actions: [
Kirigami.Action {
text: "View"
icon.name: "view-list-icons"
Kirigami.Action {
text: "action 1"
}
Kirigami.Action {
text: "action 2"
}
Kirigami.Action {
text: "action 3"
}
},
Kirigami.Action {
text: "action 3"
},
Kirigami.Action {
text: "action 4"
}
]
handleVisible: true
}
contextDrawer: Kirigami.ContextDrawer {
id: contextDrawer
actions: (pageStack.currentItem as Kirigami.Page)?.actions ?? []
}
pageStack.initialPage: mainPageComponent
Component {
id: mainPageComponent
Kirigami.Page {
title: "Hello"
actions: [
Kirigami.Action {
text: "action 1"
},
Kirigami.Action {
text: "action 2"
}
]
Rectangle {
color: "#aaff7f"
anchors.fill: parent
}
}
}
}