[Development] qsizetype and classes working with QStrings or QList

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Thu Aug 27 08:04:35 CEST 2020


Hi,

Il 27/08/20 02:46, Thiago Macieira ha scritto:
> A QListView of 2 billion lines with where each line is a QString one to 7
> characters in length would be 2G * (24 + 32) = 96 GB of memory use.
> QListWidget's overhead is much worse.

This isn't accurate; QListView (with the default delegate) doesn't cache 
data, and only fetches and shows what's visible in its viewport. So the 
actual consumption is pretty much constant no matter how big is the 
underlying model.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200827/afacc050/attachment.bin>


More information about the Development mailing list