On Thu, 11 Oct 2012 22:21:09 +0200, Vicent Mas <uve...@gmail.com> wrote: > Hi, > > as shows the following code, QComboBox.findItem works fine with lists > but no with tuples. > > if __name__ == "__main__": > import sip > sip.setapi('QVariant', 2) > from PyQt4 import QtGui > a = QtGui.QApplication([]) > cb = QtGui.QComboBox() > cb.addItem("Foo", [3,4]) > cb.addItem("Bah", (2, 2)) > print cb.findData([3,4]) > print cb.findData((2,2)) > > Is it a bug or just a limitation of the implementation? Or something else? > > TIA
It's a limitation of QVariant in that it doesn't provide an opportunity to inject a call to a Python comparison function when comparing custom types. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt