Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QPointF to Point2D
AlvaroS last edited by koahnig
I have the points from a scene which type is QPointF.
i need these points in Point2D.
Is there any form to do this conversion?
Thanks a lot.
What is Point2D?
Joel Bodenmann last edited by Joel Bodenmann
As @jsulm pointed out there is no
Point2Dtype in Qt. I assume that you either want to use QPoint or QVector2D.
QPointis the integer precision equivalent to
QPointF. You can use
QPointF::toPoint()to "convert" a
QPoint(you will obviously loose precision).
QVector2Dhas constructors that take a
He's probably talking about this.
Just transfer the coordinates from one object to the other, I know of no explicit conversion functions.
AlvaroS last edited by
@kshegunov yes, thanks to everyone!