QString formatting issue.
Code:
double dValue = 0.00200;
The strValue is getting as 2.0e-03
I don't want the preceding zeros in the exponent part. How can i do that ?
Re: QString formatting issue.
i think only QRegExp helps you.
may be like this
Code:
QRegExp reg
("(e[+-])([0]+)([0-9]+)");
int pos = reg.indexIn(strValue);
if(pos!=-1){
strValue.replace(reg,reg.cap(1) + reg.cap(3));
}
Re: QString formatting issue.
Great.... That works.....:)