Unsolved Working with QSqlRelationalTableModel
-
I have a model that comes from a Sql database which is displayed on a TableView. I need to work with some computed columns (e.i. hourSalary*hoursWork).
I have looked around but i have not been able to understand if it possible to do this. What i want to do is the following:- add a column to the model
- calculate this new column from the other two.
- Get the total from the new column
I know that i can do that using temporary Sql tables, but it seems to me that the model almost gives me all what i need.
Thanks for the help
-
-
Thanks, I will look into it.
-
@SGaist said in Working with QSqlRelationalTableModel:
Hi,
Looks like you are looking for a proxy model based on QAbstractProxyModel.
Hope it helps
More in particular KExtraColumnsProxyModel