Qt之QString与wchar_t 互相转换
1、代码
wchar_t *QString2Wchar(QString buf) { return (wchar_t*)reinterpret_cast<const wchar_t *>(buf.utf16()); } QString Wchar2QString(wchar_t *buf) { return QString::fromWCharArray(buf); }
参考:https://blog.csdn.net/qq_45662588/article/details/123799322
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html