/* * AdvoTracker - Hotline tackingtool for Advocats * * Copyright (c) 2017 Ralf Zerres * * AdvoTracker is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * AdvoTracker is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with AdvoTracker; If not, see . */ import QtQuick 2.10 // Qt 5.10 import QtQuick.Controls 2.3 // Qt 5.10 import QtQuick.Layouts 1.3 // Qt 5.10 // AdvoTracker Module import de.networkx.AdvoTracker 1.0 as Nwx Pane { id: pane width: 1024 height: 768 visible: true ListView { id: listView width: 400 height: 800 model: ListModel { id: projectModel ListElement { projectID: 11; manager: 'Papa'; sponsor: 'Jana' } ListElement { projectID: 12; manager: 'YOU'; sponsor: 'dad' } ListElement { projectID: 13; manager: 'HE'; sponsor: 'auntie' } ListElement { projectID: 99; manager: 'Cara'; sponsor: 'Paul' } } delegate: ItemDelegate { id: projectSwipeDelegate width: parent.width spacing: 10 // height: <--- provide a height, if the contentItem does not provide it. //Layout.preferredHeight: 70 //height: 70 contentItem: Row { id: rowProjectDelegate anchors.horizontalCenter: parent.horizontalCenter width: parent.width Layout.preferredHeight: 60 height: 80 Column { id: column width: parent.width //height: 80 spacing: 8 Row { id: rowHeader spacing: 16 height: 12 Rectangle { id: rectangle2 Layout.minimumWidth: 200 Layout.preferredWidth: 250 height: 10 color: "blue" } Rectangle { id: rectangle1 Layout.minimumWidth: 100 Layout.preferredWidth: 120 height: 10 color: "red" } } // rowHeader Row { id: rowDelegate spacing: 16 Label { id: labelNumberHarm Layout.minimumWidth: 100 Layout.preferredWidth: 120 text: qsTr("Harm number") //"Schadensnummer" horizontalAlignment: Qt.AlignHRight verticalAlignment: Qt.AlignTop } Nwx.TextField { id: projectID_text Layout.preferredWidth: 200 Layout.maximumWidth: 250 height: 30 //Layout.preferredHeight: 50 text: projectID font.pointSize: 12 font.weight: Font.Black color: "black" } } // rowDelegate Label { id: manager_text text: 'Manager: ' + manager + " Sponsor: " + sponsor font.pointSize: 12 //font.weight: Font.Thin height: 15 color: "green" } } // column } // rowProjectDelegate onClicked: { console.log("index:", index, "; projectID:", projectModel.get(index).projectID) } /* swipe.right: Label { id: deleteLabel text: qsTr("Delete") color: "white" verticalAlignment: Label.AlignVCenter padding: 12 height: parent.height anchors.right: parent.right SwipeDelegate.onClicked: projectListView.model.remove(index) background: Rectangle { color: deleteLabel.SwipeDelegate.pressed ? Qt.darker("tomato", 1.1) : "tomato" } } */ } // projectSwipeDelegate } // listView } // pane