QList and QPoints error: passing 'const QPointF' as 'this' argument of 'qreal& QPointF::rx()' discards qualifiers
-
Hi,
Because
at
returns a const reference whilefirst
can either return a reference or a const reference and rx is a non const method of QPointF. -
I just want to add that you should not use non const methods when you can use const methods anyway.
qDebug()<<points.at(0).x();