Ok, I figured out how to detection using the MousePressEvent and MouseReleaseEvent and MouseMove event to do the "detect the mouse is dragging" part, now I need to retrieve the position of the mouse to do image-moving calculations. Does anyone have a snippet of code to do this?

I have this code currently, but it complains.

Qt Code:
  1. void mapScene::mouseMoveEvent( QGraphicsSceneMouseEvent * event)
  2. {
  3. debug("I vus here 2!");
  4. prevMousePoint = event->lastPos();
  5. currMousePoint = event->pos();
  6. if(mouseDown)
  7. {
  8.  
  9. // xOffset = event->pos().x() - event->lastPos().x();
  10. //yOffset = 1;
  11. }
  12. }
To copy to clipboard, switch view to plain text mode 

Complaint:
error: invalid use of undefined type `struct QGraphicsSceneMouseEvent'
error: invalid use of undefined type `struct QGraphicsSceneMouseEvent'
And it points to the lines where prevMousePoint and currMousePoint are. Both variables are of the type QPointF.