So, I finally have a proof-of-concept now. The code is kind of messy currently cause I've tried so many things to get it work. In two words: to be able to directly invoke methods of the internal model (`QObject`-derived element inside a ListView`) I define property of my custom registered type and then simply reference it in QML handlers (such as `onClicked`). The tricky part was to add `result argument in Slot definition, otherwise the call returns nothing. And to emit a signal from the Python internal model and catch it in QML ListView element I've used a straightforward signal:
Connections {
target: listItem // this is a property representing a single list element
onLogAdded: {
log.append(message);
}
}
31 December 2019