QLable Data format nice looking
Solved
General and Desktop
-
want to replace the incoming data with max 4 digit with dashes in the above image ,my problem is I can't keep "KPH" on position when the
the incoming data is loss than 4 digit . , when data is 4 digit all is prefect .code
ui->fovspeedlabel->setText("SPD "+QString::number(Speed)+" KPH");
thank you ,
-
Hi,
You can use QString::arg, set the field size to 4 and a space for filling when the number is smaller.
-
Use more than one label and layouts?!
-
Hi,
You can use QString::arg, set the field size to 4 and a space for filling when the number is smaller.