summaryrefslogtreecommitdiff
path: root/examples/declarative/qmlplaces/ReviewDelegate.qml
blob: 4974e6c9f51f7b549085fe24e1573ca4f3b02de0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import QtQuick 2.0
import Qt.location 5.0

Rectangle {
    height: childrenRect.height + 10
    width: parent.width

    radius: 10
    gradient: Gradient {
        GradientStop { position: 0.0; color: "lightgray" }
        GradientStop { position: 1.0; color: "gray" }
    }

    Column {
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.margins: 5
        y: 5
        spacing: 5

        Text {
            text: title
            font.pixelSize: 16
            font.bold: true
            width: parent.width
        }

        RatingView {
            rating: model.rating
            size: 16
        }

        Text {
            text: Qt.formatDate(date, "d MMMM yyyy")
        }

        Text {
            text: description
            wrapMode: Text.WordWrap
            width: parent.width
        }
    }
}