Show Flash (swf) content on Windows with QtWebKit 3.0 && QtQuick 2.0 && Qt 5.0
-
Hi guys,
I'm a bit desperate because I need to display Adobe Flash content using a WebView inside a Qt5/QML app. All information I found only talks about QtQuick 1.0 on Qt 4.x but WebView has changed a lot between Qt4 and Qt5.
Currently the situation is like this:
- On Linux I can see the Flash content, but it is displayed with many graphical glitches and errors. Looks like the screen updates only partially.
- On Windows8 I don't see any Flash content at all. However Firefox is able to, so I think the Flash-Plugin is installed properly.
What I did so far:
In my main.cpp I have the following.
@
#ifdef Q_OS_WIN32
qputenv("QTWEBKIT_PLUGIN_PATH", "C:\Windows\System32\Macromed\Flash");
#endifQWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled, true);
@In my QML file I have something like this:
@
import QtQuick 2.0
import QtWebKit 3.0
import QtWebKit.experimental 1.0WebView {
id: web
experimental.preferences.pluginsEnabled: true
experimental.preferences.javascriptEnabled: true
anchors.fill: parent
}
@So I use two different ways to enable plugins and JavaScript and I set the path where to look for the plugins on windows. Unfortunately without success. Is there a way to get some debug output for QtWebkit?
Also to get rid of the graphic problems on Linux I've tried the following without success:
@
QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, false);
QWebSettings::globalSettings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false);
@What else could I do? I'd appreciate all help and pointers to possible solutions.
Thanks!
ConnyP.S. A last resort might be to use Active-Qt and directly use the ActiveX-Flash-Component. However I doubt that I can then embed this into QtQuick as it look like being a QtWidgets thing. If anyone got experience with that, I'd be interested as well.
-
Hi,
I have similar problem on Windows 7. I try to run flash content in a QtQuick 2.0/QtWebkit 3.0 browser and it is not working at all.
On the other hand the fancybrowser, which is included in examples package, works with flash without problems.
Is there someone who were able to run flash player in QtQuick 2.0 application.