Hmm, the best way would always be to go through the model i.e define a Q_INVOKABLE function as you mentioned earlier.
Other pure QML way would be to interate over the childrens of TableView’s contentItem.
I had tested something similar but with ListView as follows:
for(var a=0; a<=listView.contentItem.children.length;a++)
console.log(listView.contentItem.children[a].text)
This gives the texts of all elements of ListView even if the model is C++ based.
May be you can try it for TableView but i have never tried this personally for TableView.
↧