自定义小数点和千位分隔符
作者:互联网
QString str = QString("%L1").arg(yourDouble);
据说可以,但是怎么用还没搞懂
const QLocale & cLocale = QLocale::c(); QString ss = cLocale.toString(yourDoubleNumber, 'f'); ss.replace(cLocale.groupSeparator(), yourGroupChar); ss.replace(cLocale.decimalPoint(), yourDecimalPointChar);
标签:QLocale,自定义,千位,ss,replace,QString,分隔符,cLocale 来源: https://www.cnblogs.com/qianxiaoPro/p/15471786.html