GuillaumeG
19th March 2015, 09:15
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 :
QPainterPath myPath;
myPath.moveTo( xo,yo);
myPath.lineTo( x, y );
...
QPolygonF arrowHead;
arrowHead << p << arrowP1 << arrowP2;
myPath.addPolygon(arrowHead);
myPath.closeSubpath();
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 ?
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 :
QPainterPath myPath;
myPath.moveTo( xo,yo);
myPath.lineTo( x, y );
...
QPolygonF arrowHead;
arrowHead << p << arrowP1 << arrowP2;
myPath.addPolygon(arrowHead);
myPath.closeSubpath();
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 ?