QString path=QDir::currentPath();//獲取程序當前目錄 path.replace("/","\\");//將地址中的"/"替換為"\",因為在Windows下使用的是"\"。 QProcess::startDetached("explorer "+path);//打開上面獲取的目錄
or
QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users", QUrl::TolerantMode));