I have the following QML:
menuBar: MenuBar {...}
header: ToolBar {...}
SplitView {
id: splitView
...
Item {
SplitView.preferredWidth: parent.width / 2
Component {
id: modDelegate
GridLayout {
id: modGrid; columns: 2; columnSpacing: 30
MouseArea {
z: 0; anchors.fill: parent; hoverEnabled: true
onEntered: ???; onExited: ???
}
CheckBox {}
ColumnLayout {
Layout.topMargin: 5
Text {...}; Text {...}; Text {...}; Text {...}
}
}
}
ListView {
id: modList; anchors.fill: parent; model: ModModel {}; delegate: modDelegate; focus: true
}
Layout.fillHeight: true
}
Item {
SplitView.preferredWidth: parent.width / 2
...
}
}
I want when I hover over an item of that ListView, that item to be visually highlighted (without preventing me from clicking the checkbox inside it of course).
highlightproperty of theListView? it basically highlights thecurrentIndex. - cppiscutecurrentIndexto the item's index that I hover on. But I just found info in another question's answer on how to set thecurrentIndexto the selected index. I just didn't saw anything in the docs about being able to useindexin the delegate to access the current item index. So with that I solved my problem. - FieryRider