title: Subclassing QGraphicsView, custom mouse events
body: <p>I'm subclassing QGraphicsView and what I'd like to do is: if the MidButton is pressed while the mouse is moving then we do as if we were using the regular QGraphicsView course of action but with the left button pressed which is sliding the image.</p>
  
  <p>I tried coding it but it doesn't seems to work and I don't know why.</p>
  
  <pre><code>void MyQGraphicsView::mouseMoveEvent(QMouseEvent *event)
  {
      if (event-&gt;buttons() == Qt::MidButton)
      {
          QMouseEvent event2(QEvent::MouseMove, event-&gt;pos(), Qt::NoButton, Qt::LeftButton, Qt::NoModifier);
          QGraphicsView::mouseMoveEvent(&amp;event2);
      }
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Edit: removed obvious error as pointed out by Anthony.</p>