Never use QRect::contains() for bottle-neck algorithms!
It is extremely slow, because it is not inlined and takes extra default arguments.