Where is QNetworkReply data?
-
@MyPage::MyPage(QWidget *parent) :
QWebPage(parent), cache( new QNetworkDiskCache() )
{
QNetworkAccessManager *network = this->networkAccessManager();cache->setCacheDirectory("/Users/redbit/tmp"); network->setCache( cache ); connect( network, SIGNAL(finished(QNetworkReply*)), SLOT(networkFinish(QNetworkReply*)) );
}
void MyPage::networkFinish(QNetworkReply *reply)
{
qDebug() << "Request URL [" << reply->url() << "] reply reamin bytes [" << reply->bytesAvailable() << "] -- cache : " << cache->data( reply->url() );
}
@MyPage is Inherited QWebPage.
@
QWebView *v = new QWebView(this);
MyPage *p = new MyPage(this);
v->setPage(p);
v->load("http://www.naver.com");
@and This debug result is..
...
Request URL [ QUrl( "http://www.naver.com/" ) ] reply reamin bytes [ 0 ] -- cache : QObject(0x0)
Request URL [ QUrl( "http://www.naver.com/css/main_v20141105.css" ) ] reply reamin bytes [ 0 ] -- cache : QBuffer(0x7fd18267d200)
Request URL [ QUrl( "http://sstatic.naver.net/search/css/2014/api_atcmp_0415.css" ) ] reply reamin bytes [ 0 ] -- cache : QBuffer(0x7fd1872a2540)
Request URL [ QUrl( "http://www.naver.com/js/c/nlog_20140205.min.js" ) ] reply reamin bytes [ 0 ] -- cache : QBuffer(0x7fd18728e850)
Request URL [ QUrl( "http://www.naver.com/js/c/nlog_20140205.min.js" ) ] reply reamin bytes [ 0 ] -- cache : QBuffer(0x7fd18728ced0)
...where can i find QUrl("http://www.naver.com/")'s content?