I know this is probably a stupid question, but if you put say two QGraphicsPixmapItems into a scene and you view it with QGraphicsView, how do you keep the Items from overlapping?
I know this is probably a stupid question, but if you put say two QGraphicsPixmapItems into a scene and you view it with QGraphicsView, how do you keep the Items from overlapping?
You are the one who places items in the scene, and u have to make sure that they dont overlap.
You can however check if the item collides with another item using QGraphicsItem::collidingItems .
And if you know the size of items before hand, you can use QGraphicsItem::setPos to place the items in the scene
RY (2nd October 2008)
Bookmarks