[PyQt] QComboBox.findItem and tuples
Vicent Mas
uvemas at gmail.com
Thu Oct 11 21:21:09 BST 2012
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
--
Share what you know, learn what you don't.
More information about the PyQt
mailing list