Hi,

I have this problem with this function:

Qt Code:
  1. void ImageLandmarkProxyModel::countRowsInserted(const QModelIndex &parent, int start, int end) const
  2. {
  3. const int idImageColumn=sourceModel()->column(
  4. ImageLandmarkTableModel::IdImage);
  5. const int idPointColumn=sourceModel()->column(
  6. ImageLandmarkTableModel::IdPoint);
  7. qDebug()<<"Rows inserted";
  8. for(int i=start;i<=end;i++)
  9. {
  10. QModelIndex col1=sourceModel()->index(i, idImageColumn);
  11. QModelIndex col2=sourceModel()->index(i, idPointColumn);
  12. bool ok;
  13. int id=col1.data().toInt(&ok);
  14. Q_ASSERT(ok);
  15. if(m_rowCount.contains(id)){
  16. m_rowCount[id]=1;
  17. // m_rowCount[id]=m_rowCount.value(id)+1;
  18. }
  19. else{
  20. // m_rowCount.insert(id, col2.data().isNull() ? 0 : 1);
  21. }
  22. }
  23. qDebug()<<m_rowCount;
  24. }
To copy to clipboard, switch view to plain text mode 
src\imagelandmarkproxymodel.cpp:101: error: non-lvalue in assignment

in line: m_rowCount[id]=1;

m_rowCount is a QMap<int,int>

Thanks