I have long string into QLineEdit. The beginning of line is hide.
Line:"151051.50000000"
I want hide the end and show the beginning of line.
How can I do this?
lineEdit->setCursorPosition(0);
You can also use QDoubleSpinBox
without up and down buttons for that purpose.
QString::number()
with limited precision: lineEdit->setText(QString::number(your_value, 'f', 3)); // 3 decimal places