Warning, /frameworks/kirigami/tests/actionsMenu.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2016 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 * SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 import QtQuick 0009 import QtQuick.Controls as QQC2 0010 import org.kde.kirigami as Kirigami 0011 0012 Kirigami.ApplicationWindow { 0013 id: main 0014 0015 pageStack.initialPage: Kirigami.Page { 0016 QQC2.Button { 0017 text: "button" 0018 onClicked: menu.popup() 0019 QQC2.Menu { 0020 id: menu 0021 0022 QQC2.MenuItem { text: "xxx" } 0023 QQC2.MenuItem { text: "xxx" } 0024 QQC2.Menu { 0025 title: "yyy" 0026 QQC2.MenuItem { text: "yyy" } 0027 QQC2.MenuItem { text: "yyy" } 0028 } 0029 } 0030 } 0031 0032 title: "aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa" 0033 0034 QQC2.ActionGroup { 0035 id: group 0036 } 0037 0038 actions: [ 0039 Kirigami.Action { 0040 text: "submenus" 0041 icon.name: "kalgebra" 0042 0043 Kirigami.Action { text: "xxx"; onTriggered: console.log("xxx") } 0044 Kirigami.Action { text: "xxx"; onTriggered: console.log("xxx") } 0045 Kirigami.Action { text: "xxx"; onTriggered: console.log("xxx") } 0046 Kirigami.Action { 0047 text: "yyy" 0048 Kirigami.Action { text: "yyy" } 0049 Kirigami.Action { text: "yyy" } 0050 Kirigami.Action { text: "yyy" } 0051 Kirigami.Action { text: "yyy" } 0052 } 0053 }, 0054 Kirigami.Action { 0055 id: optionsAction 0056 text: "Options" 0057 icon.name: "kate" 0058 0059 Kirigami.Action { 0060 QQC2.ActionGroup.group: group 0061 text: "A" 0062 checkable: true 0063 checked: true 0064 } 0065 Kirigami.Action { 0066 QQC2.ActionGroup.group: group 0067 text: "B" 0068 checkable: true 0069 } 0070 Kirigami.Action { 0071 QQC2.ActionGroup.group: group 0072 text: "C" 0073 checkable: true 0074 } 0075 }, 0076 Kirigami.Action { text: "stuffing..." }, 0077 Kirigami.Action { text: "stuffing..." }, 0078 Kirigami.Action { text: "stuffing..." }, 0079 Kirigami.Action { text: "stuffing..." }, 0080 Kirigami.Action { text: "stuffing..." } 0081 ] 0082 } 0083 }