QString::fromLocal8Bit
例子
QString::fromLocal8Bit("例子");
const char* str = "中文";
QString::fromLocal8Bit(str);