Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Does Qt has any unordered containers?
Cayan 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)
Since c1 < c2 and c2 < c1, Qt will assume they are equal, according to the documentation.
MuldeR 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)