Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Why QQuickItem geometry uses floating point units?
Eligijus last edited by
Why QQuickItem width, height, x , y is a floating point units? It's not like Qt can somehow paint one third of a pixel.
I'm asking because I'm porting QWidget application to QtQuick. QWidget application uses a lot of QPoint variables with widget interaction.
So does rewriting all those variables to QPointF would be beneficial or should I just use QPointF::toPoint?
because - at least in one aspect it is - like in the QGraphics framework it's possible to apply transformations, which do not map to pixels in almost all cases.
Using non-float types would result in very unprecise results.
A Former User last edited by
Quick sits on top of OpenGL (at least it was tied to it when it was new), and the fundamental type for coordinates is float in the GPU world.