Search code examples
qtqt5.5

Qt decimal separator


In many (all?) Qt gui control (like QDoubleSpinBox), QDoubleValidator etc ',' using as a decimal separator. But QString method toFloat, toDouble use '.'. What is the best way to resolve this conflict for all platforms and locals?


Solution

  • The problem is resolved. I use QLocale().toFloat() insted QString::toFloat().