I filled combobox with model like this
cityModel = new QSqlTableModel(this);
cityModel->setTable("cities"); // (city_id, city_name)
cityModel->select();
comboBox_city->setModel(cityModel);
comboBox_city->setModelColumn(1);
comboBox_city->setCurrentIndex(0);
I can get current city_id with currentIndexChanged signal.
How can i get city_id from comboBox any time without signal?
Bookmarks