QTransform.rotate() from the middle point?
-
I guess you have to translate the line so that its middle point lays on the rotation axis. Then you can rotate around this axis and afterwards you can translate your line back using the inverse of your previous translation.
Beware that translating an object and then rotating it gives a different result as first rotating it and then translating it even if the translation distance and the rotation angle is the same: This kind of coordinate transformations are not commutative.