Purushottam Sholapur wrote at: 2009. 06. 23. 08.32.:
> Hi all,
>
> Is there any way in QT to know file size before downloading the actual
> file.(by just URL) ? If I use wget on console, it first prints file size
> before it starts downloading. I am using all QNetwork* classes for
> download.
>
> regards
> Purush

Hi Purush,

if the server supports it this is possible through class ResourceResponse's 
expectedContentLength() method.

Let's see: 
WebCore/platform/network/ResourceResponseBase.h
WebCore/platform/network/qt/ResourceResponse.h

Example for ResourceResponse's usage:
WebCore/platform/network/qt/QNetworkReplyHandler.cpp

Zoltan
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to