【已解决】QString转化为char

演示一下QString—>char *

QString str;
const char* tmp = str.toUtf8().data();

string—>const char *

std::string sppp;
const char* tmp = sppp.c_str();

你可能感兴趣的:(QT,qt)