[webkit-dev] knowing filesize without downloding ... possible ?

Zoltan Horvath hzoltan at inf.u-szeged.hu
Mon Jun 22 23:50:41 PDT 2009

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: 

Example for ResourceResponse's usage:


More information about the webkit-dev mailing list