title: how to handle mouse Right click in Qt
body: <p>I am using QListView to show list of friends' names. When I click on a name it should select a name and show profile related information and on right click it needs to show context menu without selecting a name and showing profile information. The problem I am facing is on right click it is selecting the name and also shows the context menu. I don't want the name to be selected on the right click and only the context menu should be shown. I am using the Qt contextmenuevent like:</p>
  
  <pre><code>void contextMenuEvent(QContextMenuEvent *ce)
  {
      QPoint pos = ce-&gt;pos();
      emit customContextMenuRequested(pos);
  }   
  </code></pre>
  
  <p>This doesn't work and the above slot is never called.</p>