[SOLVED]Problem in loading HTML page using QWebView of QtSDK 5.1
-
I am trying to load one HTML file using QWebView, which contains a flash video.
But my webpage is not getting loaded at all. if I right click on the page , context menu is just displaying
"load" button.I am using QtSDK5.1 64bit on win7 64 bit machine.
NOTE :-- Same source code when I am compiling using QtSDK 4.8.1 32 bit it is working fine.
- I tried to install openssl libraries(copied libeay32.dll and ssleay32.dll in the same application folder) for win64 bit machine as well, but no luck.
Below mention is the code
@ QWebView m_pWyseWebView;
m_pWyseWebView.settings()->setAttribute(QWebSettings::PluginsEnabled, true);
m_pWyseWebView.settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
m_pWyseWebView.settings()->setAttribute(QWebSettings::JavaEnabled, true);
m_pWyseWebView.settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
m_pWyseWebView.settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
m_pWyseWebView.settings()->setAttribute(QWebSettings::WebGLEnabled, true);
QString str = "<html><body style="background-color:rgb(0,0,0)" topmargin="0" leftmargin="0"><embed type="application/x-shockwave-flash" src="http://z.cdn.turner.com/xslo/cvp/assets/container/2.0.4.0/cvp_main_container.swf" width="100%" height="100%" data="http://z.cdn.turner.com/xslo/cvp/assets/container/2.0.4.0/cvp_main_container.swf" name="cvp_1" id="cvp_1" type="application/x-shockwave-flash" PARAM="" quality="high" bgcolor="#000000" allowFullScreen="true" allowScriptAccess="always" wmode="direct" flashvars="context=vidEx&autostart=true&site=cnn&profile=desktop&domId=cvp_1&cvpSessionToken=KP156PURf6shHZ3PI72XS6ill"></body></html>";
m_pWyseWebView.setHtml(str,QUrl("https://edition.cnn.com/video"));
m_pWyseWebView.setGeometry(50,50, 640, 480);
m_pWyseWebView.show();
@Please help what needs to be installed extra on 64bit machine.
Any help will be greatly appreciated.
-
to make sure that QtWebkit finds the flash player plugin put this line BEFORE instantiating QWebView in your code:
@
qputenv("QTWEBKIT_PLUGIN_PATH", "<path-to-plugin-directory>");
@ -
Thanks for your response.
When I have removed wmode="direct" param from my HTML,
then it is loading fine with QWebView.