title: Call the base class implementation
body: <p>I was able to simulate the Right-Click event by subclassing the <code>QTableWidget</code>:</p>
  
  <p>header file:</p>
  
  <pre><code>#ifndef QRIGHCLICKTABLE_H
  #define QRIGHCLICKTABLE_H
  
  #include &lt;QTableWidget&gt;
  #include &lt;QMouseEvent&gt;
  
  class QRightClickTable : public QTableWidget
  {
      Q_OBJECT
  
  public:
      explicit QRightClickTable(QWidget *parent = 0);
  
  private slots:
      void mousePressEvent(QMouseEvent *e);
  
  signals:
      void rightClicked();
  
  public slots:
  
  };
  
  #endif // QRIGHCLICKTABLE_H
  </code></pre>
  
  <p>cpp file</p>
  
  <pre><code>QRightClickTable::QRightClickTable(QWidget *parent) :
      QPushButton(parent)
  {
  }
  
  void QRightClickTable::mousePressEvent(QMouseEvent *e)
  {
      if(e-&gt;button()==Qt::RightButton)
          emit rightClicked();
  }
  
  QRightClickTable *button = new QRightClickTable(this);
  ui-&gt;gridLayout-&gt;addWidget(button);
  connect(button, SIGNAL(rightClicked()), this, SLOT(onRightClicked()));
  
  
  void MainWindow::onRightClicked()
  {
      qDebug() &lt;&lt; "User right clicked me";
  }
  </code></pre>
  
  <p>Now, right-click works correctly, but there are other problems with QTableWidget: all other mouse events, such as the left click to select a cell, no longer work.
  Can you help me? I know I need to call the base class implementation in my override of mousePressEvent, you could show me how with a little piece of code?</p>