title: QSignalMapper and original Sender()
body: <p>I have a bunch of <code>QComboBox</code>es in a table. So that I know which one was triggered I remap the signal to encode the table cell location (as described in <a href="https://stackoverflow.com/questions/1332110/selecting-qcombobox-in-qtablewidget">Selecting QComboBox in QTableWidget</a>)</p>
  
  <p>(Why Qt doesn't just send the cell activated signal first so you can use the same current row/column mechanism as any other cell edit I don't know.)</p>
  
  <p>But this removes all knowledge of the original sender widget. Calling <code>QComboBox* combo = (QComboBox* )sender()</code> in the slot fails, presumably because <code>sender()</code> is now the <code>QSignalMapper</code>.</p>
  
  <p>I can use the encoded row/column to lookup the <code>QComboBox</code> in the table widget but that seems wrong. Is there a more correct way to do it?</p>
  
  <p>e.g.:</p>
  
  <pre><code>// in table creator
  _signalMapper = new QSignalMapper(this);
  
   // for each cell
      QComboBox* combo = new QComboBox();
      connect(combo, SIGNAL(currentIndexChanged(int)), _signalMapper, SLOT(map()));
      _signalMapper-&gt;setMapping(combo, row);
  
     // and finally       
     connect(_signalMapper, SIGNAL(mapped(int)),this, SLOT(changedType(int)));
  
   // slot
   void myDlg::changedType(int row)
   {      
          QComboBox* combo = (QComboBox* )sender(); // this doesn't work !!
   }
  </code></pre>
  
  <p><strong>EDIT</strong>: Added for future search: there is a new book "<strong>Advanced Qt Programming</strong>" by Mark Summerfield that explains how to do this sort of thing.</p>