Hi there

I've a QListViewwith a model derived from QAbstractListModel.

In the model I want to insert some rows:
Qt Code:
  1. bool MembersListModel::insertRows(int row, int count, const QModelIndex & parent /*= QModelIndex()*/) {
  2. beginInsertRows(parent, row, row + count);
  3.  
  4. Q_ASSERT(m_lstTempAditionalProdData->count() == count);
  5. for(int i=0; i<count; i++) {
  6. Q_ASSERT(i < m_lstTempAditionalProdData->count());
  7. m_lstProdDataForModel->insert(row+i, m_lstTempAditionalProdData->at(i));
  8. }
  9.  
  10. endInsertRows();
  11.  
  12. return true;
  13. }
To copy to clipboard, switch view to plain text mode 

If I insert the rows the view always scrolls to the begining of the list. I can't figure out what's hapening...

Any hints?

Thanks Luke