Hello to all,

i've used to be a programmer but i'ts been a long time (more than 8 years) since i've done any programming. I'm now getting back in shape by learning to program with Qt4.

Here's my problem so far with the following code:
In the header file:
Qt Code:
  1. QVector<QPoint> m_cheatTrajectoryPt;
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. m_cheatTrajectoryPt.push_back(QPoint(qRound(x), height() - 1 - qRound(y)));
To copy to clipboard, switch view to plain text mode 
And here is the compile error that puzzles me:
Qt Code:
  1. cannonfield.cpp: In member function 'QRect CannonField::shotRect() const’:
  2. cannonfield.cpp:134: erreur: passing 'const QVector<QPoint>' as ‘this’ argument of ‘void QVector<T>::push_back(const T&) [with T = QPoint]’ discards qualifiers
To copy to clipboard, switch view to plain text mode 

Any help would be greatly appreciated!

Thanks!

Luc