QString::toWCharArray可以拷贝到宽字符串里 wchar_t * sourcepath=new wchar_t[MAX_PATH];int s1=str.toWCharArray(sourcepath); sourcepath[s1]=0;