As we already saw, Graphics View provides a lot of useful functionality that covers most typical use cases. However, the real power of Qt is its extensibility, and Graphics View allows us to create custom subclasses of QGraphicsItem to implement items that are tailored for your application. You may want to implement a custom item class when you need to do the following:
- Paint something that is not possible or difficult to do with standard item classes
- Implement some logic related to the item, for example, add your own methods
- Handle events in individual items
In our next small project, we will create an item that can draw a graph of the sine function sin(x) and implement some event handling.