import QtQuick
import QtQuick.Layouts
import QtQuick.Controls.Material
Page {
id: page
Component {
id: contactDelegate
Item {
id: myItem
required property string name
required property string info
width: parent.width
height: 40
Column {
Text {
text: 'Name: ' + myItem.name
}
Text {
text: 'Number: ' + myItem.info
}
}
}
}
ListView {
anchors.fill: parent
model: mainModel
delegate: contactDelegate
highlight: Rectangle {
color: "lightsteelblue"
radius: 5
}
focus: true
}
}