From d9e2a0cbf04e8e2feab6597a5fc5c74bd5026a34 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 12 Mar 2017 15:27:50 -0700 Subject: Use QString's arg method to format the float value --- utils/alsoft-config/mainwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'utils/alsoft-config/mainwindow.cpp') diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index e06c9e17..4510781e 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -1133,10 +1133,9 @@ void MainWindow::updateRefDelayEdit(int delay) { ui->decoderNFRefDelayEdit->clear(); if(delay > 0) - { - QString str = QString::asprintf("%0.03f", delay/1000.0); - ui->decoderNFRefDelayEdit->insert(str); - } + ui->decoderNFRefDelayEdit->insert( + QString("%1").arg(delay/1000.0, 0, 'f', 3) + ); enableApplyButton(); } -- cgit v1.2.3