I am using QGraphicsPolygonItem and I noticed that it always connects the endpoint to the starting point.
I know that the terms of a polygon mean exactly that, and what I'm looking for is a "polyline" or "polygonal chain." I did not find anything like this in subclasses of QGraphicsItem.
How to draw a polygon chain in the QGraphics Framework? Is there a QGraphicsPolygonItem property or a class that does this?
QPainterPath lineTo yors, QGraphicsPathItem, .
QGraphicsLineItem QGraphicsItemGroup, , .
, ?
EDIT:
QPainterPath - , -, , .
EDIT2:
, , HostileFork - QPainterPath pathItem->setBrush(QBrush(Qt::transparent));, .
pathItem->setBrush(QBrush(Qt::transparent));
, QGraphicsPathItem. QPolygonF (.. QPolygonF, ):
QPainterPath path = new QPainterPath(); path.addPolygon(polygon); QGraphicsPathItem contour = new QGraphicsPathItem(path); contour.setPen(new QPen(QColor.black));
QGraphicsPathItem () .
, Java; , ++.