I keep in QString a number with QDoubleSpinBox, but I didn’t work to put a number with three decimal places in QString (and that’s what is required).
strObrabotka.append(QString("%1%2%3").arg(trUtf8("Расстояние от излучающего гидрофона до антенны (м) & ")).arg(ui->sb_rga->value() ).arg(trUtf8(" \\\\"))); tried so
strObrabotka.append(QString("%1%2.3f%3").arg(trUtf8("Расстояние от излучающего гидрофона до антенны (м) & ")).arg(ui->sb_rga->value(),5).arg(trUtf8(" \\\\"))); I get this result: "The distance from the radiating hydrophone to the antenna (m) 5.3f"
tried so
strObrabotka.append(QString("%1%2%3").arg(trUtf8("Расстояние от излучающего гидрофона до антенны (м) & ")).arg(ui->sb_rga->value(),3).arg(trUtf8(" \\\\"))); also did not work, I get the following result: "The distance from the radiating hydrophone to the antenna (m) 5"