Qt Jambi: Accessing the content of QNetworkReply

China☆狼群 提交于 2019-12-06 16:01:46

I imagine that the QWebPage has already queried all the QNetworkReply objects as they came in. The docs say

QNetworkReply is a sequential-access QIODevice, which means that once data is read from the object, it no longer kept by the device. It is therefore the application's responsibility to keep this data if it needs to.

so resetting it isn't going to work.

Note that if you make the network request directly through QNetworkAccessManager you do get a QNetworkReply with data available. You only get one though for the actual URL whereas the QWebPage approach downloads everything else after that i.e. images, js, etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!