Ahmad Ahmad - 3 months ago 18
C++ Question

How to convert int to QString?

Is there a

QString
function which takes an int and outputs it as a
QString
?

Answer

Use QString::number():

int i = 42;
QString s = QString::number(i);