Does Qt has any unordered containers?
-
wrote on 5 May 2012, 23:36 last edited by
I would like to know if Qt supports any unordered containers, since I could not find anything about it on the documentation I came here to confirm it.
In case it doesn't have would the could below be a workaround for my class?
@inline bool operator<(const MyClass& class1)
{
return false;
}@Since c1 < c2 and c2 < c1, Qt will assume they are equal, according to the documentation.
-
wrote on 6 May 2012, 00:56 last edited by
I'm not exactly sure what you mean, but QSet and QHash are "unordered" containers.
(They don't retain a specific order of the elements. Instead they provide fast hash-based lookup)
1/2