QComboBox *comboBox = static_cast<QComboBox*>(editor); //для наследников QObject советуют использовать qobject_castQString value = index.model()->data(index, Qt::EditRole).toString(); comboBox->setCurrentIndex(combo->findText(value));
QSqlTableModel QSqlRelationalTableModel::relationModel(int column)QSqlRelation QSqlRelationalTableModel::relation(int column)
ComboBox->model()->index(ComboBox->currentIndex(), *НОМЕР_ПЕРВОЙ_КОЛОНКИ*).data();