Hi,

I use QPainterPath to draw a line. I want to add a polygon in front of the line with addPolygon to draw an arrow head.
But the polygon is in background, and the line is always shown in front of the arrow head.

Here my code :

Qt Code:
  1. QPainterPath myPath;
  2. myPath.moveTo( xo,yo);
  3. myPath.lineTo( x, y );
  4. ...
  5. QPolygonF arrowHead;
  6. arrowHead << p << arrowP1 << arrowP2;
  7. myPath.addPolygon(arrowHead);
  8. myPath.closeSubpath();
To copy to clipboard, switch view to plain text mode 

I use QPainterPath::addEllipse too, to make disk arrow head, and I have the same problem.

What is the solution to move subpath in foreground ?