I have some models that use the QAbstractItemModel rules for retrieving and providing data for a table.
My example model has multiple columns and rows. Unfortunately QtQuick widgets can only handle a single column. Other "columns" are added to the QtQuick widgets by way of roles. So multiple columns in the view match to the same column in the model. Other model columns are ignored, as explained in this question and its answer
I was thinking that it should not be too difficult to provide an abstraction for QML to be used on the C++ side (as a QAbstractProxyModel) which when asked for row N, modulos it by the column count of the source model and retrieves the data from the resulting actual column. This would appear to work for Grid, but won't work for TableView as it relies on TableViewColumn and role names instead of using only continuous row indices. For that, the proxy model would need to distinguish by the role which column of the source model to retrieve from.
The snippet present in the answer to http://qt-project.org/forums/viewthread/41793 does that for adoping QSqlTableModel, but still misses translating a lot of the signals to be usable. Like I imagine if the SQL source model would emit columnsInserted, it should translate to a signal dataChanged with the new roles chosen for that column and a change of the available role names. The QMLifyProxyModel appears to be better, but not production ready and dead for 4 years now, it seems.
How can we best fix this so that the two worlds work together fluently, according to the official recommendation? Why don't QtQuick views use the (row, column) notation that QAbstractItemModel and QTableView has been using already?