向 Qtwebkit 添加新的插件路径

发布于 2024-08-19 17:06:15 字数 212 浏览 11 评论 0原文

我正在尝试扩展 qtwebkit 用于搜索插件的搜索路径。基本上我正在创建一个使用 QTBrowserPlugin 类设计的插件,我试图让我的浏览器使用 QTwebKit 编程来搜索我指定的文件夹中的插件,因为我不希望插件存储在Mozilla Firefox 插件目录或标准插件目录。

这可能吗?我可以让我的浏览器只查找我指定的目录,跳过所有标准目录。由于浏览器仅用于查看本地 html 页面。

I am trying to extend the search paths that qtwebkit uses to search for plugins. Basically I'm creating a plugin that is designed using the QTBrowserPlugin class and I am trying to make my browser which is programmeed using QTwebKit to search for the plugin in a folder specified by me as I don't want the plugin to be stored in the Mozilla Firefox plugins directory or the standard plugins directories.

Is this possible, and can I make my browser only look in the directory that I've specified, skipping all the standard directories. Since the browser will only be used to view locaL html pages.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过期以后 2024-08-26 17:06:15

QtWebKit 中似乎没有公共方法来执行此操作。

如果您愿意从源代码构建 QtWebKit,则可以向 QWebPage 添加一个调用 PluginDatabase::setPluginDirectories()PluginDatabase::refresh() 的方法。

There does not seem to be a public method in QtWebKit for doing this.

If you're willing to build QtWebKit from source, you can add a method to QWebPage that calls PluginDatabase::setPluginDirectories() and PluginDatabase::refresh().

深爱成瘾 2024-08-26 17:06:15

我相信您可以为此目的设置环境变量 QTWEBKIT_PLUGIN_PATH 。

I believe you can set the environment variable QTWEBKIT_PLUGIN_PATH for this purpose.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文