QWebView加载网页成功但不显示或图标显示不全

1.用QWebView::load(QUrl())加载网址的时候会提示

qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method

qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method

但是貌似又不影响使用。

2.加载淘宝或有些网址的时候图标显示不全或不显示,但是又显示加载成功(loadfinished()信号返回true)。加上以下即可

QWebSettings *webSettings = QWebSettings::globalSettings();
    webSettings->setAttribute(QWebSettings::LocalStorageEnabled, true);

Specifies whether support for the HTML 5 local storage feature is enabled or not. This is disabled by default. (This value was introduced in 4.6.)


展开阅读全文

没有更多推荐了,返回首页