qml calendar component
-
what do you mean it doesn't work to select date or to display different color according to compare date ?
here is to display different color. I think your delegate have not problem, so check your code.
import QtQuick 1.0 Item { id: main width: 1280; height: 720 focus: true ListModel{ id: mymodel ListElement { d: "2015-05-25" } ListElement { d: "2015-05-26" } ListElement { d: "2015-05-27" } } ListView { width: 100; height: 100*4 focus: true model: mymodel delegate: Item { width: 100; height: 100 Rectangle { color: "black" opacity: 0.5 Text { text: d color: d==="2015-05-25" ? "yellow" : "white" anchors.centerIn: parent } anchors.fill: parent } } highlight: Rectangle { color: "red" opacity: 0.5 } } }