Reputation: 24846
I have a problem:
std::string str("character/test/raw");
qDebug() << QString::fromStdString(str);
and the output is:
"]AIIIIIIIIIIIIIIIIIIIIIIIIIIIII"
I think the problem is in encoding but don't know how to fix it. Please help
Upvotes: 8
Views: 9565
Reputation: 8802
string to const char*, then to qstring
std::string str("character/test/raw");
QString qstr(str.c_str());
qDebug() << qstr;
Upvotes: 9