[Qt-interest] Qt show folder size

Sean Harmer sean.harmer at maps-technology.com
Fri Sep 18 13:52:28 CEST 2009


On Friday 18 Sep 2009 12:09:02 Andrei Sebastian Cimpean wrote:
> This returns a standard size around 4 kb:
> QString::number(fileorfolder.size(),10)
> Does anyone know how to get the sum of all the items inside the folder?
> Thank you
Yes, iterate through them and sum the sizes. Should be trivial with 
QDirIterator and QFileInfo.

Sean



More information about the Qt-interest-old mailing list