Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.12
- import QtQuick.Window 2.12
- import QtQuick.Controls 2.14
- import QtGraphicalEffects 1.0
- Window {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- ListModel {
- id: devModel
- ListElement {
- hostname: "Apple"
- model_name: "N90UG"
- status: "good"
- date_install: "18.01.2020"
- date_change: "18.01.2020"
- }
- ListElement {
- hostname: "Samsung"
- model_name: "N547KL"
- status: "good"
- date_install: "18.01.2020"
- date_change: "18.01.2020"
- }
- ListElement {
- hostname: "Nokia"
- model_name: "Mj809H"
- status: "good"
- date_install: "18.01.2020"
- date_change: "18.01.2020"
- }
- }
- ListView {
- id: listExample
- anchors.fill: parent
- visible: true
- spacing: 6
- model: devModel
- delegate: PropertiesView {
- id: delegateElement
- anchors.left: parent.left
- anchors.leftMargin: 10
- anchors.right: parent.right
- anchors.rightMargin: 10
- background: Rectangle {
- id: elementDevice
- implicitWidth: 100
- implicitHeight: 40
- opacity: enabled ? 1 : 0.3
- color: delegateElement.down ? "#dddedf" : "#eeeeee"
- }
- DropShadow {
- anchors.fill: parent
- cached: true
- horizontalOffset: 3
- verticalOffset: 3
- radius: 8.0
- samples: 16
- color: "#80000000"
- source: parent
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement