Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Getting value from QSpinbox and setting to 1 decimal place.
James Sprinks last edited by
I need to pull the value of a QSpinbox, set it to a double variable - but to one decimal place.
I have set the variable:
double decimal = ui->manualRate->value();
I am wondering how I now set this double to one decimal place?
VRonin last edited by VRonin
decimal = static_cast<double>(qRound(decimal*10.0))/10.0