1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#pragma once #include <QtGlobal> #include <QString> #include <QHashFunctions> // Qt < 5.14.0 #ifndef QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF namespace std { template<> struct hash<QString> { unsigned operator()(const QString& value) const { return qHash(value); } }; } #endif