只适合windows,Qt用这个是个老坑地方。windows是反斜杠,tolocal8bit转到系统编码。
QString strPathName("~~~~");
strPathName.replace('/','\\');
LPCSTR lp=strPathName.toLocal8Bit().constData();
ShellExecuteA(0,"open","explorer.exe",lp,NULL,true);
更多文章:http://blog.csdn.net/what951006
powered by:小乌龟在大乌龟背上~