I\'m visualizing a graph using Qt\'s graphics view framework. It looks something like this:
QGraphicsItem::setFlag(QGraphicsItem::ItemIgnoresTransformations,true);
This should do the trick.
If you look at the docs for addEllipse it states: -
Creates and adds an ellipse item to the scene, and returns the item pointer. The geometry of the ellipse is defined by rect, and its pen and brush are initialized to pen and brush.
Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0).
So what you're doing here is placing all the items at (0,0) , but the item's rects are changing. What you need to do is create the items and then set their positions.