PDA

View Full Version : QSqlTableModel Insert Column Sum at the end of the model or table.



aekilic
6th April 2011, 10:54
Dear All

We have lots of QSqlTabelModel's that has double values in some columns. What we normaly to is to make a second query and have the sum of the column. What we would like to do is make it without a second query. Is it possible to calculate the of a column in model and after that insert it into bottom of the query.

Waiting for your reply!!!

wysota
13th April 2011, 00:43
Yes, you can subclass the model and add an additional entry to the model or implement a proxy model that will do that if you don't want to pollute the original model.