Am 19.09.2016 um 23:27 schrieb Olivier Goffart:
We really cannot have a qHash for QVariant anyway, because that would imply
that ALL QVariant can be hashed, and compared. Which is not the case. Most
custom types don't even register comparator function.
Which actually is quite a serious issue, as we do a simply memcmp() on
such custom types, which simply won't work if your custom data structure
contains uninitialized memory from alignment padding.
It is easy to forget registering comparator functions and currently Qt
doesn't help in debugging such issues. So I wonder if QVariant should
forbid comparison of custom types without having a comparator function
Development mailing list