title: Qt: accept mouseRelease only when there was no drag and drop
body: <p>I have a subclass of QGraphicsView that should accept two kinds of mouse events: drag and drop for scrolling and simple clicks for item selection/highlight.
  So I use</p>
  
  <pre><code>setDragMode(QGraphicsView::ScrollHandDrag);
  </code></pre>
  
  <p>to enable scrolling the view with the "Hand". And I have a function like this:</p>
  
  <pre><code>void GraphView::mouseReleaseEvent(QMouseEvent* e)
  {
      if (e-&gt;button() == Qt::LeftButton)
          emit leftClicked(mapToScene(e-&gt;pos()));
      else
          emit rightClicked(mapToScene(e-&gt;pos()));
      QGraphicsView::mouseReleaseEvent(e);
  }
  </code></pre>
  
  <p>which creates signal whenever the user clicks on the scene.</p>
  
  <p>However, the problem is: when I stop dragging and release the mouse button, the <code>mouseReleaseEvent</code> function is called, and if the cursor happens to be over some element of the scene, it will get highlighted.
  How can I changed the <code>mouseReleaseEvent</code> function so that the signals are created only if there was no previous drag of the mouse? </p>