pragma ComponentBehavior: Bound import QtQuick import QtCore import QtQuick.Controls as QQC2 import QtQuick.Layouts import org.kde.kirigami as Kirigami import org.kde.kirigamiaddons.formcard as FormCard import org.kde.kirigamiaddons.components as KirigamiComponents Kirigami.CardsListView { id: root Kirigami.PlaceholderMessage { visible: root.count == 0 anchors.centerIn: parent text: "No reviews!" } delegate: Kirigami.AbstractCard { id: delegate required property int id required property string diff required property var reviews clip: true header: Editor { text: delegate.diff file: "bla.txt" } contentItem: Item { implicitHeight: commentsLayout.implicitHeight implicitWidth: commentsLayout.implicitWidth ColumnLayout { id: commentsLayout anchors.fill: parent Repeater { model: delegate.reviews ColumnLayout { required property var modelData Kirigami.Separator { Layout.fillWidth: true } RowLayout { Layout.fillWidth: true Layout.fillHeight: true KirigamiComponents.Avatar { name: modelData.user.username source: modelData.user.avatarUrl Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium Layout.fillWidth: false Layout.alignment: Qt.AlignTop } QQC2.Label { text: `@${modelData.user.username}` Layout.fillWidth: false Layout.alignment: Qt.AlignTop } } MarkdownLabel { Layout.fillWidth: true text: modelData.body } } } MarkdownTextArea { id: addComment Layout.fillWidth: true } } } } }