Your code works fine for me. You are probably doing something wrong, like not rebuilt properly, etc.
main.cpp
#include <QLabel>
#include <QApplication>
#include <QString>
#include <QDebug>
int main(int argc, char **argv)
{
QApplication a(argc, argv);
float f = 2.09863591;
QString s = QString::number(f, 'f', 8);
qDebug()<< "Test:" << s;
QLabel label;
label.setText(s);
label.show();
return a.exec();
}
main.pro
TEMPLATE = app
TARGET = main
greaterThan(QT_MAJOR_VERSION, 4):QT += widgets
SOURCES += main.cpp
Output
Number as String: "2.0986359"