fixed problem with atof returning integers - the C locale was set to Qt Creator locale and ',' was the decimal separator. passing in numbers '.' resulted in an unknown type, which atof converts automatically to integers if possible. setlocale(LC_NUMERIC, ''C'') was solution.