April 2018
Beginner
714 pages
18h 21m
English
In this example, we avoided creating a class for our custom rectangle to keep the code as simple as possible. Following the principles of object-oriented programming, subclassing QGraphicsRectItem and creating children items in the constructor of the new class is a good idea. Doing this doesn't require anything you don't already know. For example, when subclassing QGraphicsRectItem, you don't need to implement any virtual functions, because they are all properly implemented in the base classes.
Read now
Unlock full access