title: Qt/C++: QTableView contextmenu and passing through information
body: <p>I want a contextmenu on the cells in my QTableView, so first I connected:</p>
  
  <pre><code>connect(ui-&gt;tblTimesheet,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(sheetContextMenu(const QPoint &amp;)));
  </code></pre>
  
  <p>And the slot for that connect is below:</p>
  
  <pre><code>void wndMyWindow::sheetContextMenu(const QPoint &amp;pos){
      QMenu *menu = new QMenu;
      QModelIndex cell = ui-&gt;tblTimesheet-&gt;indexAt(pos);
      // Make sure the right click occured on a cell!
      if(cell.isValid()){
          QString myid=cell.sibling(cell.row(),0).data().toString();
          menu-&gt;addAction("Remove item", this, SLOT(sheetRemoveItem()));
          menu-&gt;exec(ui-&gt;tblTimesheet-&gt;mapToGlobal(pos));
      }
  }
  </code></pre>
  
  <p>Which creates the menu and puts an action in the menu which calls a function when that action is clicked. However, I want to pass through the variable myid into the second slot. That slot is listed below:</p>
  
  <pre><code>void wndMyWindow::sheetRemoveItem(){
      qDebug("Sure I'm here, but what info do I have?");
      return;
  }
  </code></pre>
  
  <p>I'm not quite sure how to do this, can anyone help?</p>