summaryrefslogtreecommitdiff
path: root/examples/declarative/qmlplaces/DescriptionDelegate.qml
blob: 371b44ad3a9bd56b4d3adf5f6eeea92e5c3e5e41 (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
import QtQuick 2.0
import Qt.location 5.0

Rectangle {
    property Description description

    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: description.contentTitle
            font.pixelSize: 16
            font.bold: true
            width: parent.width
            visible: description.contentTitle.length > 0
        }

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