Ahmad Ahmad - 4 months ago 30
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);