Answers for "qt string to qstring"

3

from integer to qstring qt

Use QString::number():

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

qt string to qstring

std::string str = "Hello world";
QString qstr = QString::fromStdString(str);
Posted by: Guest on July-06-2021

Browse Popular Code Answers by Language