I have a QSortFilterProxyModel which is accessible from my QML code. I am using it in a ListView in my QML code, but I also would like to access the first element of it outside of my ListView.
Let's say I call my QSortFilterProxyModel sortedObjects. In the ListView I just pass it to the model property, like model: sortedObjects and then in the delegate property I can access it's roles, by the specified role names. How can I do this outside of a ListView? Something like sortedObjects[0].someRoleName.