I have an table view showed
part description, quantity, price
And I have a Model/View using this code
model = new QSqlRelationalTableModel(this);
model->setTable("parts");
model->setRelation(3,QSqlRelation("part_tbl","part_id","part_desc"));
model->select();
ui->tableView->setModel(model);
I need to add a new column that shows quantity * price in the table view. It's important to know I'm using QsqlRelationalTableModel
Help is appreciated, Thanks in advance