Имеется GridView, нужно при наведении мышкой на элемент сетки делать его активным. Не могу понять что дописать в onEntered.
Код:
Component {
id: contactDelegate
Item {
width: gridView.cellWidth; height: gridView.cellHeight
MouseArea
{
width: parent.width
height: parent.height
hoverEnabled: true
Column {
anchors.fill: parent
Image {
width: 100
height: 100
source:path
fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter }
Text { text: name; anchors.horizontalCenter: parent.horizontalCenter }
}
}
}
}
GridView {
id: gridView
x: 0
y: 80
width: 640
height: 400
highlightRangeMode: GridView.ApplyRange
flickableDirection: Flickable.AutoFlickDirection
boundsBehavior: Flickable.DragOverBounds
cellHeight: 120
cellWidth: 110
highlightFollowsCurrentItem: true
keyNavigationEnabled: true
focus:true
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
delegate:contactDelegate
model:
ListModel {
id:files
}
}
На данный момент выделение по умолчанию на 1ом элементе и не смещается