I am converting the time since the start of the program to a QString continuously which I print in the status bar. I print it like this:
ui
->statusBar
->showMessage
("Time: " + QString::number(system.
get_time(),
) + " s");
ui->statusBar->showMessage("Time: " + QString::number(system.get_time(), ) + " s");
To copy to clipboard, switch view to plain text mode
I have already changed the font to a fixed width font ("Courier"), but since the number of decimals after the decimal point keeps changing, the unit ("s") keeps moving forth and back all the time and is barely readable. The maximum number of decimals printed at the same time seems to be 6 though. How can I most easily make sure that 6 decimals are always printed, even if the last of the decimals are zeros?
Bookmarks