I want to add another command to itemDelegate.onClick
.
Here is my code:
ListView {
id: beam_viewer
x: 8
y: 18
width: 188
height: 374
delegate: ItemDelegate {
id: delegate_item
width: 180
height: 25
Text {
text: modelData
anchors.verticalCenter: parent.verticalCenter
}
onClicked: img_footprint.source = applicationPath +
"footprints/" + modelData + ".webp"
}
}
I use onClicked
for change my image source and I want to use modelData
for myText.text . I use ui.qml and it doesn't allow to use { } after onClicked because it reject using javascript
.
How can I add to onClicked myText.text = modelData
.
Thank you!