In the documentation of QAbstractItemModel, I can find this:
QSize QAbstractItemModel::span ( const QModelIndex & index ) const [virtual]
Returns the row and column span of the item represented by index.
Note: Currently, span is not used.
Currently to achieve span in QTableView I am using
void QTableView::setSpan ( int row, int column, int rowSpanCount, int columnSpanCount )
but this is not the right way, as this has to be done from the model,
Doing on the view, I have to handle the span when the rows are sorted or columns moved around, as the span remains in the same place, but the data moves around.
To ensure that the span is linked to the data it was meant to be for, it has to come from the model.
Is there anyway to achieve span, wherein the span moves when sorted or filter etc, with the data.
When is the plan to implement the span method in QAbstractItemModel?