The documentation for QGraphicsScene::addEllipse 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).
The function is defined as: -
QGraphicsEllipseItem * QGraphicsScene::addEllipse ( const QRectF & rect, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
The rect passed to the function provides the local coordinates of the item and the item is positioned at (0,0).
You need to set the position of the item using the pointer returned from addEllipse and calling setPos()
QGraphicsEllipseItem* pEllipse = scene->addEllipse(pt.x()-rad, pt.y()-rad, rad*2.0, rad*2.0,QPen(), QBrush(Qt::SolidPattern));
pEllipse->setPos(xPos, yPos); // where xPos and yPos are the scene coordinates
When retrieving the item's position, although the function QGraphicsItem::pos will return the item's parents coordinates which may be scene coordinates if no parent exists, you'd be better off calling QGraphicsScene::scenePos to guarantee that the coordinates returned are actually scene coordinates, even if you add parent items at a later stage.
QList<QGraphicsItem *> list = scene->items();
foreach( QGraphicsItem * item, list )
{
qDebug() << item->scenePos();
}