I have a MySql table, let\'s call it x:
CREATE TABLE x ( Id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, A int unsigned NOT NU
You can use QSqlQueryModel with sql join query:
QSqlQueryModel
QSqlQueryModel *model = new QSqlQueryModel; model->setQuery("SELECT x.Id, y.First, y.Last, x.B FROM x " "LEFT JOIN y ON x.A = y.Id"); QTableView *view = new QTableView; view->setModel(model); view->show();