Hello,

I have this situation:

Qt Code:
  1. QSqlQuery query;
  2. query.prepare("SELECT * FROM mytable");
  3. query.exec();
  4. query.first();
  5.  
  6. QString value = "";
  7. while (query.next())
  8. {
  9. value = query.value(0).toString();
  10. cout << value.toStdString() << "\n";
  11. }
  12. in my output i get the 2 values below:
  13. 50.450,50
  14. 85.336,50
To copy to clipboard, switch view to plain text mode 
with SQL i can do it as below:
Qt Code:
  1. "SELECT TOTAL(myfield) FROM mytable"
To copy to clipboard, switch view to plain text mode 
but i need to do it in my C++ code, so

How could I sum these type of values in my while clause?

Thanks
Juliano