[PyKDE] QComboBox.itemData() returns invalid QVariant

Tom Brown brown at esteem.com
Wed Aug 30 17:43:55 BST 2006


Hi,

I am running into trouble with QComboBox.itemData(). I can add an item with 
data to the combobox, but when I try to get the data back out, itemData() 
returns an invalid QVariant. For example:

id = 1
self.addItem(rev, QVariant(id))
self.itemData(0).toInt() --> 0, False
self.itemData(0).isValid() --> False

I searched the mailing list and didn't see anybody else with the same issue. I 
must be doing something wrong. Any ideas?

Thanks,
Tom




More information about the PyQt mailing list