Warning, /frameworks/kirigami/examples/pagerow.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Layouts 1.15 0003 import QtQuick.Controls 2.15 as QQC2 0004 import org.kde.kirigami 2.20 as Kirigami 0005 0006 Kirigami.ApplicationWindow { 0007 pageStack.initialPage: [page1, page2] 0008 0009 Kirigami.Page { 0010 id: page1 0011 RowLayout { 0012 QQC2.Button { 0013 text: "add card" 0014 onClicked: cardsView.model.append({}); 0015 } 0016 0017 QQC2.Button { 0018 text: "remove card" 0019 onClicked: { 0020 if (cardsView.model.count > 0) { 0021 cardsView.model.remove(cardsView.model.count-1) 0022 } 0023 } 0024 } 0025 } 0026 } 0027 Kirigami.ScrollablePage { 0028 id: page2 0029 Kirigami.CardsListView { 0030 id: cardsView 0031 anchors.fill: parent 0032 model: ListModel {} 0033 delegate: Kirigami.Card { 0034 banner.title: index 0035 contentItem: QQC2.Label { 0036 text: "lorem ipsum" 0037 } 0038 } 0039 } 0040 } 0041 }