title: How to set transform origin for QPainter In Qt
body: <p>I am using <strong>PyQt</strong> and more accurate <code>QPainter</code> for drawing a line. I need to rotate this line around an origin point (like clock handles), but setting it is not possible, I think!
  I found <code>setTransformOriginPoint</code> but it doesn't work for <code>QPainter</code> object. Setting origin point is not possible for <code>QTransform</code> and <code>rotate</code> that could affect <code>QPainter</code> object.</p>
  
  <p>Also I tried rotating the line manually, using rotation equation and ..., this is the code:</p>
  
  <pre><code>def rotateLine(x, y, d):
      d = math.radians(d)
      x2 = x * math.cos(d) - y * math.sin(d)
      y2 = x * math.sin(d) + y * math.cos(d)
      return x2, y2
  des = QPoint(400, 0)
  for k in range(0, 10):
      paint.drawLine(center, des)
      newLine = rotateLine(des.x(), des.y(), 45)
      des = QPoint(newLine[0], newLine[1])
      logging.warning(des)
  </code></pre>
  
  <p>But it doesn't work correctly!
  What should I do?</p>