📜  qstring 到字符串 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:26.454000             🧑  作者: Mango

代码示例5
QString qs;

// Either this if you use UTF-8 anywhere
std::string utf8_text = qs.toUtf8().constData();

// or this if you're on Windows :-)
std::string current_locale_text = qs.toLocal8Bit().constData();