Important: Please read the Qt Code of Conduct -

[SOLVED] Finding the centre of a QPainterPath and its vector of direction ?

  • I need to add text to a curve, right in the centre of the curve, rotated to be aligned with the direction of the curve. I could find the vector by finding two points close to the middle of the curve and get their relative angle, but in the API I don't seem to find any methods to get points from the curve that are not points the curve is based on.

    Any ideas? 10x in advance!

  • Ops, I obviously need to work on my focus skills, totally missed the pointAtPercent method for QPainterPath.

    Problem solved!

Log in to reply