Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
ComboBox filled using a model
passtec last edited by
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 ?
koahnig last edited by
welcome to devnet
Would (see "here":http://doc.qt.nokia.com/4.7/qcombobox.html#currentIndex-prop
@void setCurrentIndex ( int index )@
fluca1978 last edited by
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.