But only in case of incompatibility - in my code class samolot inherits form QGraphicItem, so I think its ok -at least I guess so...
Without checking for NULL value, you will have a crash soon after you place an item that is not a "samolot" on the scene and give it the zValue = 4.