Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] Distance between QLineF and QPointF
Joel Bodenmann last edited by Joel Bodenmann
I need to calculate the difference between a QLineF and a QPointF. I couldn't find a built-in method for that in the Qt library so I guess I have to do it myself. But before I start spending time I just want to double check: Is there really no built-in support for this? It is quite a common thing to do, no?
dcape last edited by
Doesn't look like there is one. Though I saw this thread that was discussing the same thing: http://www.qtcentre.org/threads/953-Selecting-a-QLine
The last post has a dist() function that may be what you need.
You can always submit a JIRA to suggest it to be added to the QLineF class.
Joel Bodenmann last edited by
Awesome, thank you very much for your answer!