title: PyQt: How do I find tuples using QComboBox::findData()?
body: <p>I can't get <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#findData" rel="nofollow"><code>QComboBox::findData</code></a> to work properly in my PyQt application.</p>
  
  <p>It seems as if PyQt doesn't compare QVariant's with Python tuples properly, causing Qt not to find my tuples. Example follows:</p>
  
  <pre><code>import sip
  sip.setapi('QVariant', 2)
  from PyQt4 import Qt
  
  a = Qt.QApplication([])
  
  cb = Qt.QComboBox()
  cb.addItem("Bah", (1,2))
  cb.addItem("Foo", (3,4))
  
  print cb.findData((1,2))
  print cb.findData((3,4))
  
  print cb.itemData(0)
  print cb.itemData(1)
  
  print cb.findData(cb.itemData(0))
  print cb.findData(cb.itemData(1))
  </code></pre>
  
  <p>With api=2 (auto-convert QVariant&lt;->python) it does not find anything and I get the following output:</p>
  
  <pre><code>-1
  -1
  (1, 2)
  (3, 4)
  -1
  -1
  </code></pre>
  
  <p>With api=1 (no auto-convert), it only finds it in the latter (useless) case:</p>
  
  <pre><code>-1
  -1
  &lt;PyQt4.QtCore.QVariant object at 0x02FBF148&gt;
  &lt;PyQt4.QtCore.QVariant object at 0x02FBF148&gt;
  0
  1
  </code></pre>
  
  <p>Any idea how to get the first case working (findData with new tuples, and auto-convert QVariant) ?</p>
  
  <p><em>(Using PyQt 4.8.3, SIP 4.12.1 and Qt 4.6.1)</em></p>