add a new plugins path to Qtwebkit
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.
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()
.
I believe you can set the environment variable QTWEBKIT_PLUGIN_PATH for this purpose.
精彩评论