[SOLVED] Add a calculated field to a table model
-
how is possible to add a calculated field to a table model - or better to a QSqlRelationalTableModel.
struggling with this for a day and without success yet. my friend Google let me down this time with Qt -
If you are going to use SQL database then you can calculate the fields in the database. "Here":https://www.youtube.com/watch?v=CBJV3A84Wnc is a good overview of QSqlRelationalTableModel.
"Spreadsheet":http://qt-project.org/doc/qt-5/qtwidgets-itemviews-spreadsheet-example.html is a good example on how to calculate the fields in the table view.
-
indeed the sql view is verry powerfull even on sqlite that i'm using. thanks for reply.