Nominate our 2022 Qt Champions!

Qt 5, QtWebKit, Flash-plugin availability

  • 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.

  • 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.

  • 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.

Log in to reply