作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我写了一个 Qt 小部件应用程序。在文件菜单中,我想插入一个 MS word 文档作为用户手册。有什么办法吗?我检查了 Qt 帮助和各种博客,但没有一个给我明确的解决方案。
最佳答案
如果只是手动操作,则无需在您的应用中嵌入 MS Word
。也许尝试用计算机上安装的 Word
打开需要的文档。试试这个代码:
QDesktopServices::openUrl(QUrl("file:///G:/tst.docx"));
只需设置需要的路径。 As doc said:
If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.
关于c++ - 如何在 Qt GUI 应用程序中附加 MS word 文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27566361/
我是一名优秀的程序员,十分优秀!