Qt/webkit 和 flash [英] Qt/webkit and flash
问题描述
我已经在 xp 和 Qt 上安装了 pyqt 4.8.1 包.我有一个像
I have installed pyqt 4.8.1 on xp and Qt in package. I have a tag like
<object ...>
<param value='1.swf'>
<embed src='1.swf'></embed>
</param>
</object>
但是 Qt/webkit 不显示 flash.(代码和 IE 或 chrome 没有问题).Qt/webkit 是否支持 flash?
But Qt/webkit doesn't show flash. (there is not problem with code and IE or chrome). Does Qt/webkit support flash?
推荐答案
您所要做的就是启用插件.请参阅特定于 Python 的 Qt 示例,但在 C++ 中是这样的.
All you have to do is enable plugins. See the python specific Qt example but in C++ its like this.
QWebPage *网页= ...网页->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebPage *webpage = ... webpage->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
插件由 NPAPI 加载http://en.wikipedia.org/wiki/NPAPI
Plugins are loaded by NPAPI http://en.wikipedia.org/wiki/NPAPI
这篇关于Qt/webkit 和 flash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!