QT 弹出pdf 或者网页【软件 help/about按钮】
https://blog.csdn.net/y363703390/article/details/78885164
1.弹出网页
QProcess *helpProcess = new QProcess(this);
QDesktopServices::openUrl(QUrl(QLatin1String("http://blog.csdn.net/y363703390")));
2.弹出pdf(未完成)
QStringList argument("C:\\llq\\wd.pdf");
QString exePath = "C:\\Program Files (x86)\\极速PDF阅读器\\JisuPdf.exe";
QTextCodec *code = QTextCodec::codecForName("GB2312");//解决中文路径问题
QString exeName = code->fromUnicode(exePath).data();
helpProcess->startDetached(exeName, argument);
存在两个问题:1.中文路径问题;2.路径存在空格问题(startDetached,可以解决空格问题)
中文路径:
https://blog.csdn.net/qq_15947787/article/details/77801569
https://bbs.csdn.net/topics/391958282
空格: