QPoint - Hash values

Recently I have noticed, that:

x = QPoint(1, 1)
y = QPoint(1, 1)

and hash(x) == hash(y) is not true, though x == y. Why is it so?
Because of that points cannot be used effectively in set or dict. Is
there any particular reason for that?

--

-- 
Filip Gruszczyński

Phil Thompson | 6 Oct 23:28

Re: QPoint - Hash values

On Mon, 6 Oct 2008 22:12:40 +0200, "Filip Gruszczyński"
<gruszczy <at> gmail.com> wrote:
> Recently I have noticed, that:
> 
> x = QPoint(1, 1)
> y = QPoint(1, 1)
> 
> and hash(x) == hash(y) is not true, though x == y. Why is it so?
> Because of that points cannot be used effectively in set or dict. Is
> there any particular reason for that?

Because Qt doesn't implement a qHash() for QPoint.

Phil

Gmane