[PyQt] Trouble reading a model index from an "untouched" combo box

Claudio Felix felix.claudio at gmail.com
Tue Jan 26 22:29:16 GMT 2010


2010/1/26 Demetrius Cassidy <dcassidy36 at mass.rr.com>:
> How about selecting index 0 once the combobox is initialized with the
> database data? It sounds to me that it has no valid index when first
> initialized, and if you try to programmatically select the first index, it's
> returning an invalid one. You don't need to generate a signal, just use
> something like .setCurrentIndex(0).
>


Thanks for the answer Demetrius. Unfortunately, it didn't change it.
Maybe I do have to use a QDataWidgetMapper on the combo box? I thought
just getting the model associated with it should do it.. it shows all
the models' values indeed...

Cheers...


More information about the PyQt mailing list