Ahmad Ahmad - 6 months ago 69
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);