Warning, /frameworks/kirigami/tests/CardTest.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 0002 import QtQuick.Controls 0003 import QtQuick.Layouts 0004 0005 import org.kde.kirigami as Kirigami 0006 0007 Item { 0008 width: 600 0009 height: 600 0010 0011 Kirigami.Card { 0012 width: 300 0013 anchors.centerIn: parent 0014 0015 banner.title: "Card" 0016 banner.titleIcon: "document-new" 0017 banner.titleAlignment: alignCombo.currentValue 0018 banner.source: "/usr/share/wallpapers/Next/contents/screenshot.png" 0019 0020 contentItem: Label { 0021 text: "Card Contents" 0022 } 0023 0024 actions: [ 0025 Kirigami.Action { 0026 icon.name: "document-new" 0027 text: "Action 1" 0028 }, 0029 Kirigami.Action { 0030 icon.name: "document-new" 0031 text: "Action 2" 0032 } 0033 ] 0034 } 0035 0036 RowLayout { 0037 anchors.bottom: parent.bottom 0038 anchors.horizontalCenter: parent.horizontalCenter 0039 0040 ComboBox { 0041 id: alignCombo 0042 0043 model: [ 0044 { text: "Top Left", align: Qt.AlignLeft | Qt.AlignTop }, 0045 { text: "Top Center", align: Qt.AlignHCenter | Qt.AlignTop }, 0046 { text: "Top Right", align: Qt.AlignRight | Qt.AlignTop }, 0047 { text: "Center Left", align: Qt.AlignLeft | Qt.AlignVCenter }, 0048 { text: "Center", align: Qt.AlignHCenter | Qt.AlignVCenter }, 0049 { text: "Center Right", align: Qt.AlignRight | Qt.AlignVCenter }, 0050 { text: "Bottom Left", align: Qt.AlignLeft | Qt.AlignBottom }, 0051 { text: "Bottom Center", align: Qt.AlignHCenter | Qt.AlignBottom }, 0052 { text: "Bottom Right", align: Qt.AlignRight | Qt.AlignBottom } 0053 ] 0054 0055 textRole: "text" 0056 valueRole: "align" 0057 } 0058 } 0059 }