Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试扩展 qtwebkit 用于搜索插件的搜索路径。基本上我正在创建一个使用 QTBrowserPlugin 类设计的插件,并且我正在尝试制作使用 QTwebKit 编程的浏览器来搜索我指定的文件夹中的插件,因为我不希望插件存储在Mozilla Firefox 插件目录或标准插件目录。
这可能吗,我可以让我的浏览器只查看我指定的目录,跳过所有标准目录。由于浏览器将仅用于查看本地 html 页面。
我相信您可以为此设置环境变量 QTWEBKIT_PLUGIN_PATH 。
QtWebKit 中似乎没有这样做的公共方法。
如果您愿意从源代码构建 QtWebKit,您可以向 QWebPage 添加一个方法,该方法调用PluginDatabase::setPluginDirectories()和PluginDatabase::refresh().
PluginDatabase::setPluginDirectories()
PluginDatabase::refresh()