Hi
i dynamicly create a QMap and put it on QList
Qt Code:
  1. QMap<QPoint, int> myMap;
  2.  
  3. for(int i=0; i<5; i++)
  4. {
  5. for(int j=0; j<5; j++)
  6. {
  7. myMap.insert(QPoint(j, i), 0);
  8. }
  9. }
  10.  
  11. this->MapList.insert(0, myMap);
To copy to clipboard, switch view to plain text mode 

and i can get the value but i can`t set it :C

Qt Code:
  1. 1) this->MapList.at(0)[QPoint(x,y)] = 1;
  2.  
  3. 2) this->MapList.at(0).insert(QPoint(x,y), 1);
To copy to clipboard, switch view to plain text mode 

1) lvalue required as left operand of assignment

2)passing 'const QMap<QPoint, int>' as 'this' argument of 'QMap<Key, T>::iterator QMap<Key, T>::insert(const Key&, const T&) [with Key = QPoint; T = int]' discards qualifiers [-fpermissive]
why it dont work ?