问题
I made a simple web browser but when I access to
https://get.adobe.com/jp/flashplayer/
It says
Adobe Flash Player is already installed, but disabled
However as I read http://doc.qt.io/qt-5/qtwebengine-platform-notes.html It says that pepper flash plugin should be automatically loaded if there is a proper dll file. I checked my C:\Windows\System32\Macromed\Flash\ and I'm sure that I have a pepflashplayer32_21_0_0_213.dll there.
Then I also set
QWebEngineSettings *websetting = QWebEngineSettings::defaultSettings();
websetting->setAttribute(QWebEngineSettings::PluginsEnabled, true);
but still no hopes. Anyone knows how to enable flash with QtWebEngine?
回答1:
OK I got a working answer here:
https://forum.qt.io/topic/66187/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6/3
For me I have to copy pepflashplayer.dll from chrome. It seems that installed pepflashplayer*.dll from adobe does not work.
回答2:
After installing PepFlashPlayer, you need to enable PPAPI in your application manually (it is disabled by default). Use following code before showing the page:
QWebEngineSettings::globalSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
回答3:
Maybe do it manually with this command line argument:
--ppapi-flash-path=./libpepflashplayer.so
See also the different bug reports relative to this problem : 51774 and 49625.
来源:https://stackoverflow.com/questions/36689786/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6