一、Qt QString 转为 C++ 标准库 string: string str = qstr.toStdString(); 二、C++ 标准库 string 转为 Qt QString: QString qstr = QString::fromStdString(str);