GoodMorning to all,
I've a problem perhaps easy to solve, but I don't know how :)
This is my problem: I've a Dialog that create a record for a Custromers table, and I've 3 tables in my db for Countries, City, and Zip codes.
I've create my Dialog with QDataWidgetMapper and QSqlRelationalTableModel and three relations for the table above, now, I got three QCombobox filled by data but... not filtered! I'd like that the QComboBox City show only the city relative to the Country selected on the precedings QComboBox (my table had 3 different Foreign keys for the 3 tables, so 3 relations isn't it?).
I can connect the currentIndexChanged(int) of the first QCombobox to a Slot that filter the model of the second one, but... when I use the QDataWidgetMapper to modify one element, this event don't fire so it doesn't work.
Where I got a mistake? How can I got what I search?
Thanks a lot for your time
Michele