This is the base class of all items drawn on the scene. It contains various methods and properties to deal with drawing each item, collision detection (with other items), handling mouse clicks and other events, and much more. Even though you can subclass it and create your own graphical items, Qt provides a set of subclasses too, which can be used for most (if not all) of the daily graphical tasks. Here are those subclasses, some of which we already used in the previous examples, directly or indirectly:
- QGraphicsEllipseItem
- QGraphicsLineItem
- QGraphicsPathItem
- QGraphicsPixmapItem
- QGraphicsPolygonItem
- QGraphicsRectItem
- QGraphicsSimpleTextItem
- QGraphicsTextItem
As it was previously mentioned, QGraphicsItem provides numerous functions and properties to deal with the problems and tasks in a graphical application. In this section, we'll go through some...