PDA

View Full Version : Newbie: GraphicsView Framework



RY
10th September 2008, 03:59
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?

aamer4yu
10th September 2008, 06:09
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