Is there a function that takes int as a factor and returns QString? I'm looking for a function like intToQSTring() in the code below!
int i = 42;
QString s = intToQSTring(i)
Write QString::number() Returns the string that converts the number n to its true value.
The function prototype is as follows:
QString QString::number(long n, int base = 10)
The true value is set to 10
by default, and the range is [2,36]
.
If it is not a decimal, n
is considered unsigned int
.
int i = 42;
QString s = QString::number(i);
© 2024 OneMinuteCode. All rights reserved.