I encounter a coordinate problem when I reimplement the QGraphicsView.

I derive from the QGraphicsView, to get the cursor position in the pixmap coordinate, which is on the scene( at center, i guess, cause I simply scene()->addPixmap(..) ).

void MyView::mousePressEvent (QMouseEvent *event)
{
...
QPointF cp = mapToScene(event->pos());
...
}

As I use the following codes to check the pixmap's location in scene coordinate
QGraphicsPixmapItem *item = (QGraphicsPixmapItem *)scene()->itemAt(0, 0);
QPointF offset1 = item->offset();
QPointF scePos = item->scenePos();

both offset1 and scePos is (0, 0)
So I think that the item is at scene's center, while the pixmap on it is at the item's center too.
Then the cp from the mousePressEvent should equal to its coordinate in pixmap, right ?
However, tha fact seems incorrect, could you give me any advice, 3ks.