I'm trying to draw my own objects(inherited from QGraphicsItem) on my own scene (inherited from QGraphicsScene) on mouse click. When I handle mousePressEvent it puts new object in the wrong place (namely it doubles its coordinates while setting and speed while moving).

I handle MousePressEvent like this:
Qt Code:
  1. void PolygonScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
  2. {
  3. if (mouseEvent->button() != Qt::LeftButton)
  4. return;
  5.  
  6. PPoint *p = new PPoint(QColor(127, 0, 0), mouseEvent->scenePos().x(), mouseEvent->scenePos().y());
  7. addItem(p);
  8. QGraphicsScene::mousePressEvent(mouseEvent);
  9. }
To copy to clipboard, switch view to plain text mode 

And I create GraphicsScene and GraphicsView this way:
Qt Code:
  1. graphScene = new PolygonScene();
  2. QPixmap pix = QPixmap::fromImage(image);
  3. graphScene->clear();
  4. graphScene->addPixmap(pix);
  5. ui.graphicsView->setGeometry(QRect(5, 5, pix.width(), pix.height()));
  6. ui.graphicsView->setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
  7. ui.graphicsView->setScene(graphScene);
  8. ui.graphicsView->show();
To copy to clipboard, switch view to plain text mode 

Where should i look for the source of troube?
Thank you