[PyQt] QPoint - Hash values
phil at riverbankcomputing.com
Mon Oct 6 22:28:19 BST 2008
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.
More information about the PyQt