i want to Get the position( x,y) of the cursor moving on my custom QGraphicsView Control

So, i made new class "MyQGraphicsView : QGraphicsView"

then i defined and implemented "mouseMoveEvent"

in MyQGraphicsView .h

Qt Code:
  1. void mouseMoveEvent ( QMouseEvent * event);
To copy to clipboard, switch view to plain text mode 

in MyQGraphicsView.cpp

Qt Code:
  1. void MyGraphicsViwer::mouseMoveEvent ( QMouseEvent * event )
  2. {
  3. MainForm->ui.Txt_xValue->setText((QString::number)(x()));
  4. }
To copy to clipboard, switch view to plain text mode 

the problem is in the first mouse move, the Txt_xValue displays value 100, then it doesn't change where ever the mouse moves.

So ?

Thanks