views:

213

answers:

2

Hi

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.

A: 

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().

Jamey Hicks
Can you explain what you mean by building QtWebKit from source... you mean modifying the QT code itself????
Red Serpent
A: 

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

emcmanus