QDesktopServices desktopServices;
QString strUrl=QCoreApplication::applicationDirPath () ;
strUrl=QString("file:///%1/mainhelp.chm").arg (strUrl);
QUrl qqq(strUrl);
desktopServices.openUrl(qqq);

 

//打包的话就直接用这个路径

编译环境那个下的话需要将路径修改为当前路径,或者直接将CHM文件存在release或debug下

相关文章:

  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-12-04
  • 2021-06-02
  • 2022-12-23
  • 2021-10-21
猜你喜欢
  • 2022-02-04
  • 2021-05-16
  • 2022-12-23
  • 2021-07-06
  • 2021-06-08
  • 2023-02-09
  • 2021-11-29
相关资源
相似解决方案