Hey,
how do I get the corner points of a given QGraphicsPolygonItem? I couldn't find anything in the documentation.
Thanks
Hey,
how do I get the corner points of a given QGraphicsPolygonItem? I couldn't find anything in the documentation.
Thanks
I'm not sure what you mean exactly by "corner" points, but you could call QGraphicsPolygonItem::polygon() to get the QPolygonF. Since QPolygonF inherits from QVector<QPointF>, you can use any member functions of QVector to access the points in the polygon. For example:
Qt Code:
{ // do stuff to each point }To copy to clipboard, switch view to plain text mode
Bookmarks