ComboBox filled using a model
I am filling my comboBox with a model built from my database.
But I would like to know how to get the current object selected.
Does anybody have an idea ?
welcome to devnet
Would (see "here":http://doc.qt.nokia.com/4.7/qcombobox.html#currentIndex-prop
@void setCurrentIndex ( int index )@
You can get the "current index ":http://doc.qt.nokia.com/latest/qcombobox.html#currentIndex-propand then extract the index from your model. Or use currentText and do something similar.