Qt - custom decimal point and thousand separator

后端 未结 6 1848
野趣味
野趣味 2021-02-13 23:52

How can I convert a number (double) to string, with custom decimal point and thousand separator chars?

I\'ve seen QLocale, but I don\'t want to choose the localization c

6条回答
  •  青春惊慌失措
    2021-02-14 00:45

    Since you don't want QLocale perhaps you could do a simple conversion (with QString::number, for example) and then replace the desired characters afterwards.

提交回复
热议问题