qt中打开excel、word等文件方法

来源:互联网 发布:科目二驾考模拟软件 编辑:程序博客网 时间:2024/05/22 13:58

这样即可,调用excel并打开文件

QFile file(fileName);

if (file.exists()) 

{

QDesktopServices::openUrl(QUrl::fromLocalFile(fileName));

}

如果是调用exe程序直接这样,比如打开计算器

QProcess process;
process.execute(“C:/Windows/System32/calc.exe”);

阅读全文
0 0