When I do this :
model->setTable("table");
tableView->setModel(model);
model->setFilter ("id = 660");
model = new QSqlRelationalTableModel;
model->setTable("table");
tableView->setModel(model);
model->setFilter ("id = 660");
To copy to clipboard, switch view to plain text mode
IT's Works!
But when I do this :
model->setTable("personne");
tableView->setModel(model);
model->setFilter ("id = 660");
model = new QSqlRelationalTableModel;
model->setTable("personne");
model->setRelation(3, QSqlRelation("status", "id", "nom"));
tableView->setItemDelegate(new QSqlRelationalDelegate(tableView));
tableView->setModel(model);
model->setFilter ("id = 660");
To copy to clipboard, switch view to plain text mode
It's doesn't work !! Why ?
Bookmarks