In order to effectively use the framework, you need to know what graphics item classes it provides. It's important to identify the classes you can use to construct the desirable picture and resort to creating a custom item class, only if there is no suitable item or you need better performance. Qt comes with the following standard items that make your life as a developer much easier:
Standard item | Description |
QGraphicsLineItem |
Draws a line. You can define the line with setLine(const QLineF&). |
QGraphicsRectItem |
Draws a rectangle. You can define the rectangle's geometry with setRect(const QRectF&). |
QGraphicsEllipseItem |
Draws an ellipse or an ellipse segment. You can define the rectangle within which the ellipse ... |