void SitesDialog::CB_load(){ QSqlQuery qq; qq.exec("SELECT name from towns"); qq.first(); while (qq.next()) { sitdial_ui.town_CB->addItem(qq.value(0).toString()); }}
mapp->addMapping(sitdial_ui.town_CB, 1);
map = new QDataWidgetMapper(); map->setModel(sqlRn); map->addMapping(ui.spinBox, 1); map->addMapping(ui.lineEdit, 0); map->toLast(); ui.comboBox->setModel(map->model()); ui.comboBox->setModelColumn(0); ui.comboBox->setCurrentIndex(map->currentIndex());
map = new QDataWidgetMapper(); map->setModel(sqlRn); map->addMapping(ui.spinBox, 1); map->addMapping(ui.lineEdit, 0); map->addMapping(ui.comboBox->lineEdit(), 0); map->toLast();
my_mapper->addMapping(sitdial_ui.name_LE,3);
my_mapper->addMapping(sitdial_ui.town_CB, 1, "currentText");
mapper->addmapping(departamentComboBox, Employee_DepartamentId)