The class is the same except the name and the use of QPointer to avoid segfault with deleted QGraphicsObject.