The Graphics View Framework is part of the Qt Widgets module and provides a higher level of abstraction useful for custom 2D graphics. It uses software rendering by default, but it is very optimized and extremely convenient to use. Three components form the core of Graphics View, as shown:
- An instance of QGraphicsView, which is referred to as View
- An instance of QGraphicsScene, which is referred to as Scene
- Instances of QGraphicsItem, which are referred to as Items
The usual workflow is to first create a couple of items, add them to a scene, and then show that scene on a view:
After that, you can manipulate items from the code and add new items, while the user also has the ability to interact with visible items.
Think of the items as Post-it notes. You take a note and write a message on it, paint an image on it, both write and paint on it, or, quite...