Hello,

I re-implement mouse event handlers in a subclass of QGraphicsScene and have a problem with the mouseMoveEvent() function.

The following code works (i.e. when I press the left/middle/right buttons, hold and move, I have the text displayed):
Qt Code:
  1. void Scene::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
  2. {
  3. std::cout<<"hehe"<<std::endl;
  4. }
To copy to clipboard, switch view to plain text mode 

but the following does not (nothing happens even if I press the left button):
Qt Code:
  1. void Scene::mouseMoveEvent(QGraphicsSceneMouseEvent* e)
  2. {
  3. if(e->button()==Qt::LeftButton) std::cout<<"hehe"<<std::endl;
  4. }
To copy to clipboard, switch view to plain text mode 

The following code also works
Qt Code:
  1. void Scene::mousePressEvent(QGraphicsSceneMouseEvent* e){
  2. if(e->button()==Qt::LeftButton) std::cout<<"hehe"<<std::endl;
  3. }
To copy to clipboard, switch view to plain text mode 

Hope it's not a bug of Qt and somebody can help.
Thank you so much.