Hi All,

I'm pretty new to Qt, so I apologise in advance if there's an obvious way to do this that I've overlooked...

I'm using Qt Creator 1.3.1 and Qt 4.6.2 on a Linux (Ubuntu) machine, and the application I'm writing has a QGraphicsScene and associated view. I've made a Custom QGraphicsItem, derived from QGraphicsRectItem.

One or more of these Custom GraphicsItems can be added to the View/Scene - and the problem I'm having is that they will be added in the same place by default, and I can't see an obvious and simple way of arranging them so that they will not collide with each other when the view is redrawn.

I thought about trying to apply a Grid Layout style to the scene or view, but I can't figure out how to do that, and the only other way I can think of forcing the objects to not collide is to attempt to add at a given location, and use the colliding items list to determine whether or not I can add at the given location, and keep trying until I find a free location.

I'm sure there's an easier way to do this, but I can't quite see it, as mentioned before, I'm very new to Qt (Most of my previous work has been done using MFC but that's not an option here due to the constraints on system, OS etc.)

So, if anyone can help, I'd greatly appreciate it