Qt 5, QtWebKit, Flash-plugin availability
-
wrote on 8 Jun 2013, 11:23 last edited by
How can I get information if Flash NPAPI plugin available for WebKit in program?
I have following code
@ui->_client->settings()->setAttribute(QWebSettings::PluginsEnabled, true);@But if Flash plugin isn't available I want to suggest installing it. Any ideas? I'm not sure that it's a good idea to try to do it through file system.
-
wrote on 8 Jun 2013, 18:22 last edited by
Take a look at "http://qt-project.org/doc/qt-5.0/qtwebkit/qwebpluginfactory.html":http://qt-project.org/doc/qt-5.0/qtwebkit/qwebpluginfactory.html maybe this can helps you.
-
wrote on 10 Jun 2013, 03:52 last edited by
Ok. I've tried to get Plugins list with this
@ui->_client->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
ui->_client->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
ui->_client->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
QListQWebPluginFactory::Plugin plugins = ui->_client->page()->pluginFactory()->plugins();@
But I've got the following application output
@Starting C:\qtsihvi\build-untitled-Desktop_Qt_5_0_2_MinGW_32bit-Release\release\untitled...
Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
The program has unexpectedly finished.
C:\qtsihvi\build-untitled-Desktop_Qt_5_0_2_MinGW_32bit-Release\release\untitled exited with code -1073741819@
I guess that I try to get some insecure data, but I don't know have to correct this code. -
wrote on 10 Jun 2013, 08:59 last edited by
If your application uses WebKit do display your content and is not a general purpose web browser then you can use JavaScript to detect the availability of the Flash plugin and its version (i.e. using getFlashPlayerVersion/hasFlashPlayerVersion from swfobject).
You can then display the warning message directly from JS or pass the availability information to your native code using a method exposed through WebKit bridge.
4/4