1
我正在使用QWebView來顯示聊天記錄。QWebview,HTTP代理,html5視頻不起作用
webView = new QWebView(this);
QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true);
webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
webView->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
webView->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
webView->settings()->setMaximumPagesInCache(0);
webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
如果沒有設置QWebView的代理,像這樣的HTML代碼工作正常。
<iframe width=\"100%\" height=\"315\" frameborder=\"0\" allowfullscreen src=\"http://www.youtube.com/embed/" + rxYouTube.cap(11) + "\" ></iframe>
但是,當我做這樣的事情
QNetworkProxy proxy;
proxy.setType(QNetworkProxy::HttpProxy);
proxy.setHostName("_ip_");
proxy.setPort(_port_);
proxy.setUser("_login_");
proxy.setPassword("_passsword_");
QNetworkProxy::setApplicationProxy(proxy);
YouTube的告訴我,我的瀏覽器不支持HTML5。
我該如何解決這個問題?
PS平臺的:Qt 4.8,Windows中,VC