title: How to use mouseEvent on QGraphicsView
body: <p>I have a class that inherits <code>QGraphicsView</code> and I want to add <code>mousePressEvent</code> on this class.<br>
  How can I do that?</p>
  
  <p>This is my function:</p>
  
  <pre><code>void mousePressEvent(QGraphicsSceneMouseEvent *event) {
      cards[0]-&gt;setPos(event-&gt;pos());
      scene-&gt;addItem(cards[0]);
  }
  </code></pre>
  
  <p>Where <code>cards[0]</code> is a <code>QGraphicsPixmapItem</code>, but it doesn't work.</p>