Qt在win下自动打开文件夹

来源:互联网 发布:单片机最小系统板 编辑:程序博客网 时间:2024/05/18 15:30
#include <QProcess>
#include
<QDir>
#include
<QString>
QString path=QDir::currentPath();//获取程序当前目录

path.replace("/","\\");//获取到地址中的"/"替换为"\"
QProcess::startDetached("explorer "+path);//打开文件

原创粉丝点击