PDA

View Full Version : How to refresh the content of a QSqlRelational Delegate



graciano
19th May 2014, 16:20
After creating a model (QSqlRelationalTableModel) and a view to access it (QTableView) i'm using a QSqlRelationalDelegate on some fields to access the related tables.
The code used is:

view->setItemDelegateForColumn(0, new QSqlRelationalDelegate(view));

The problem is that when data changes in the related tables, a simple model.select() updates data, but the combox associated to the delegate still shows the old values.
How do i update it?

Thanks