QString addMillage(QString str){
QLocale locale(QLocale::English, QLocale::UnitedStates);
QRegExp rx("\b\d+(\.\d+)?");
int pos = 0;
while ((pos = rx.indexIn(str, pos)) != -1) {
QString numStr = rx.capturedTexts()[0];
double num = numStr.toDouble();
int dotCnt = 0;
if(!numStr.contains("."))
dotCnt = 0;
else
dotCnt = numStr.length() - numStr.indexOf(".") -1;
QString formattedStr = locale.toString(num, 'f',dotCnt);
str.replace(pos, rx.matchedLength(), formattedStr);
pos += formattedStr.length();
}
return str;
}