[PyKDE] QPoint arithmetric operator problems

Hans-Peter Jansen hpj at urpla.net
Thu Feb 3 22:15:36 GMT 2005


Send again, with all intended text..

On Thursday 03 February 2005 20:15, bdw wrote:
> >
> >     def mousePressEvent(self, e):
> >         self.pressPos = p = e.pos()
>
> Hello Peter
>
> I think a copy of the QPoint needs to be cached here, otherwise the
> mousemove handler will always be adding the same QPoint to itself.
>
> Replacing the line above with the following seems to work okay for
> me.
>
> 	self.pressPos = p = QPoint(e.pos())

Ahh, thanks for the enlightment. Looks, like I've converted way to 
much C++ code today.. ;-) 

> Hope this helps,

This was very helpful.

Have a good night,
Pete




More information about the PyQt mailing list