Hi,
I'm using a QSqlRelationalTableModel with two QSqlRelationalDelegates, comparable to the qt example: link
In this example if I add a new City or Country (in the database), how do I tell the QSqlRelationalDelegates to update their data (tell the combobox to refresh the data)?
you can call something like
m_tableView->itemDelegate() to get a pointer to the QAbstractItemView but there's no method like refresh() or update().
Second question is:
Is it more efficient to implement a search for a QSqlRelationalTableModel using model->setFilter();model->select(); or is more performant to use a QSortFilterProxyModel between the QSqlRelationalTableModel and the QTableView e.g.:
Qt Code:
proxyModel->setSourceModel(model ); tableView->setModel(proxyModel );To copy to clipboard, switch view to plain text mode
Bookmarks