QHash is a Qt template class that provides a hash-table-based dictionary
QMap is a Qt container class that implements a map a.k.a
Values lookups faster
"Qhash is faster but qmap values are sorted by key if you iterate through them"
Qt Data Type Choice
"Qhash provides faster lookups than qmap"
* (no title is found for this review)
Also with the method of using qpair from the other answer this has the particular advantage that you can access elements by rows easily if it matters for your use case you could use different container for different dimensions like if you need one dimension to be sorted use qmap which is sorted by key for that and qhash which is more efficient for the dimension which doesn t need sorting
How to create three dimensional array with QHash?