1 Attachment(s)
QGraphicsPolygonItem Returning line to start
Hey,
I have a QGraphicsPolygonItem, i'm capturing a mouseEvents->scenePos() and <<'ing it to the QGraphicsPolygonItem->polygon()
I'm almost getting what I want, but as I draw, there's always a line from my current position returning to my start position. See pictures where there's a straight line (pointed in red) from the green end point to the blue start point.
Why does this line exist? I dont want the polygon to be closed, i just want a 'freehand line'.
Am I using the correct shape?
Any help to stop this closing line appearing would be excellent.
Re: QGraphicsPolygonItem Returning line to start
How are u adding the QGraphicsPolygonItem to the scene ? can we see the code ?
Or may be you can look at using QGraphicsPathItem . May be QGraphicsPolygonItem closes the polygon.