我在写一个简单的计算器。逗号是我默认区域设置中的十进制分隔符。我希望全局地(对于所有的TextFields)将十进制分隔符设置为点.,而不是逗号,,这样就可以在TextField中输入点。
我怎样才能做到这一点?
TextField {
validator: DoubleValidator {
bottom: 0.0
decimals: 1
notation: DoubleValidator.StandardNotation
}
placeholderText: "0.0"
}发布于 2015-06-30 00:06:09
在启动时用QLocale::setDefault(QLocale::c());代码调用C++。
https://stackoverflow.com/questions/31105419
复制相似问题