Re: Can QHash::capacity() be smaller than QHash::size()?!?
Originally Posted by iw2nhl
If I understand correctly the documentation, capacity() should give the number of allocated items (which generally is greater than the number of inserted items, for speed reasons).
In case of QHash the docs say:
int QHash::capacity () const
Returns the number of buckets in the QHash's internal hash table.
Buckets are not items --- they might contain more than one (key, value) pair.
Bookmarks