QT QString char * 转换

1. QString 转 char * 

QString strQstring;
const char * ptrchar = strQstring.toStdString().c_str();

2. char * 转 QString

char cstr[] = "abc";

QString strQstring = QString(cstr);

 

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