I filled comboBoxCountry and comboBoxCity with another QSqlTableModel not with my main QSqlRelationalTableModel and than mapped
mapper->addMapping(comboBoxCity, cityIdx);
mapper->addMapping(comboBoxCountry, countryIdx);
I cannot filter the my main model. Filtering works or whole Sql query.
I added a signal to comboBoxCountry that it filters the city model. Every things ok.
If i submit changes to sql table, main country and city ids are updating to sql table form comboboxes. Because city and country indexes not changed in main model.
I must submit the mapper contents not model.
Any ideas?
Bookmarks