QList and QPoints error: passing 'const QPointF' as 'this' argument of 'qreal& QPointF::rx()' discards qualifiers
General and Desktop
4
Posts
3
Posters
3.1k
Views
2
Watching
-
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();