I have to add one component to QGraphicsView which is composed of more different shapes/items. Each component's view is defined by ordered list of different shapes:
1. Rectangle (0,0,100,100) -gray
2. Rectangle (5,5, 70,70) - yellow
3. Text (15,15) - black
comp_ex.png

How can i compose item like that and add it to QGraphicsView?

I already tried with QGraphicsPathItem but it doesn't allows composition like this and more colors and so on..