PDA

View Full Version : std::string to QString



baray98
19th July 2008, 00:17
I am looking for the easiest way to convert a c++ standard string to a QString?

I can only think of appending them (char ) one by one into QString but there must be an easy way ....

baray98

JimDaniel
19th July 2008, 03:56
QString qstring(stdstring.c_str());

or

QString::fromStdString(stdstring);

are easy.