[PyKDE] QComboBox question...

GuineaPig guineapig at pi.be
Wed Nov 5 11:54:00 GMT 2003


Hello,

I'm new to pyqt and I'm having a question about QComboBox.  I have one 
on a form that I would like to populate with data from a db-table.  The 
table is very simple, it has only two columns, an id and a description.  
I would like to add the descriptions as items to the combobox with the 
id as index.  (Something like: self.cmbSearch.insertItem(description, 
id)).  But I'm getting 'index out of range' errors.  Could this be 
because the indexes need to be in consecutive order (and the series of 
id's isn't) ?  I can't find info on this in the pyqt-documentation...

Tnx in advance,

Tom




More information about the PyQt mailing list