QPointF to Point2D
-
What is Point2D?
-
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 toQPointF. You can useQPointF::toPoint()to "convert" aQPointFtoQPoint(you will obviously loose precision).
QVector2Dhas constructors that take aQPointorQPointF. -
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 toQPointF. You can useQPointF::toPoint()to "convert" aQPointFtoQPoint(you will obviously loose precision).
QVector2Dhas constructors that take aQPointorQPointF.He's probably talking about this.
Just transfer the coordinates from one object to the other, I know of no explicit conversion functions.
-
He's probably talking about this.
Just transfer the coordinates from one object to the other, I know of no explicit conversion functions.
@kshegunov yes, thanks to everyone!