49 if ( field.
type() == QMetaType::Type::Double && config.contains( u
"Precision"_s ) && value.isValid() )
52 const double val( value.toDouble( &ok ) );
55 const int precision( config[u
"Precision"_s].toInt( &ok ) );
59 result = QLocale().toString( val,
'f', precision );
63 else if ( ( field.
type() == QMetaType::Type::Int ) && value.isValid() )
66 const double val( value.toInt( &ok ) );
69 result = QLocale().toString( val,
'f', 0 );
72 else if ( ( field.
type() == QMetaType::Type::LongLong ) && value.isValid() )
75 const double val( value.toLongLong( &ok ) );
78 result = QLocale().toString( val,
'f', 0 );
83 result = value.toString();