title: Using an existing (row, column) C++ model with QtQuick (Grid, TableView)
body: <p>I have some models that use the <code>QAbstractItemModel</code> rules for retrieving and providing data for a table. </p>
  
  <p>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 <a href="https://stackoverflow.com/questions/21270969/using-a-qabstracttablemodel-with-a-qml-tableview-display-ony-the-1st-column">this question and its answer</a></p>
  
  <p>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 <code>QAbstractProxyModel</code>) 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 <code>Grid</code>, but won't work for <code>TableView</code> as it relies on <code>TableViewColumn</code> 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. </p>
  
  <p>The snippet present in the answer to <a href="http://qt-project.org/forums/viewthread/41793" rel="noreferrer">http://qt-project.org/forums/viewthread/41793</a> does that for adoping <code>QSqlTableModel</code>, but still misses translating a lot of the signals to be usable. Like I imagine if the SQL source model would emit <code>columnsInserted</code>, it should translate to a signal <code>dataChanged</code> with the new roles chosen for that column and a change of the available role names. The <a href="http://www.qtcentre.org/wiki/index.php?title=QMLifyProxyModel" rel="noreferrer">QMLifyProxyModel</a> appears to be better, but not production ready and dead for 4 years now, it seems.</p>
  
  <p>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 <code>QAbstractItemModel</code> and <code>QTableView</code> has been using already?</p>