Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
None
-
fb65b32d7621f065ec854f1e72828720bffb3b39 (qt/qtbase/dev)
Description
To use QPoint in a QSet or QHash, you have to have a qHash function for it:
https://doc.qt.io/qt-5/qhash.html#the-qhash-hashing-function
For some reason, Qt doesn't define a qHash function for QPoint. This leads to people defining their own:
https://stackoverflow.com/questions/24498993/cannot-use-qpoint-as-qhash-key
Incidentally, in my case, another library that I'm using defines its own qHash for QPoint in a header that I'd rather not include (because it's for unrelated stuff). Yet if I try to define my own, I get an error about qHash being redefined. This would not be an issue if Qt defined hash functions for all of its applicable types.
Attachments
For Gerrit Dashboard: QTBUG-86457 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
313091,5 | Add qHash implementation for QPoint | dev | qt/qtbase | Status: MERGED | +2 | 0 |