QString::fromStdString(content)
is better since it is more robust. Also note, that if std::string
is encoded in UTF-8, then it should give exactly the same result as QString::fromUtf8(content.data(), int(content.size()))
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…