Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Distance between QLineF and QPointF
Forum Updated to NodeBB v4.3 + New Features

[Solved] Distance between QLineF and QPointF

Scheduled Pinned Locked Moved General and Desktop
qpointfqlinef
3 Posts 2 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Joel BodenmannJ Offline
    Joel BodenmannJ Offline
    Joel Bodenmann
    wrote on last edited by Joel Bodenmann
    #1

    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?

    Industrial process automation software: https://simulton.com
    Embedded Graphics & GUI library: https://ugfx.io

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dcape
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      2
      • Joel BodenmannJ Offline
        Joel BodenmannJ Offline
        Joel Bodenmann
        wrote on last edited by
        #3

        Awesome, thank you very much for your answer!

        Industrial process automation software: https://simulton.com
        Embedded Graphics & GUI library: https://ugfx.io

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved