Answers for "qt number to string"

3

how to convert qt string to string

QString qs;
// do things
std::cout << qs.toStdString() << std::endl;
Posted by: Guest on February-14-2020
2

qt int to string

int x = 56
QString str = QString::number(x);
//str == "56"
Posted by: Guest on June-07-2021
3

from integer to qstring qt

Use QString::number():

int i = 42;
QString s = QString::number(i);
Posted by: Guest on March-08-2020

Browse Popular Code Answers by Language