import QtQuick 2.0
import QtContacts 5.0
Rectangle {
id: win
width: 360
height: 360
ContactModel {
id: contactsModel
manager: "memory"
Component.onCompleted: {
contactsModel.importContacts(Qt.resolvedUrl("example.vcf"))
}
}
ListView {
id: contactsView
anchors.fill: win
model: contactsModel
clip: true
delegate: Rectangle {
border.width: 1
border.color: "darkred"
width: win.width
height: 52
Column {
spacing: 3
anchors.left: parent.left
anchors.leftMargin: 8
anchors.verticalCenter: parent.verticalCenter
Text { text: contact.name.firstName }
Text {
text: "modified: " + contact.modified
font.bold: true
}
}
}
}
}