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. -
wrote on 5 Aug 2015, 23:29 last edited by alex_malyu 8 May 2015, 23:30
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();
-
wrote on 10 Aug 2015, 06:59 last edited by
super, thank you! that solved my litttle problem.
3/4