[PyQt] Where to start

David Boddie david at boddie.org.uk
Fri Jun 3 16:19:14 BST 2011

On Fri Jun 3 15:24:55 BST 2011, diego wrote:

> [...]
> def mouseMoveEvent(self, event):
>          if event.button() == Qt.LeftButton:
> [...]
> you check if the value retured by QMouseEvent.button() is Qt.LeftButton
> but in
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qmouseevent.html
>#buttoon states that "the returned value is always Qt.NoButton for mouse
> move events."; the code in mouseMoveEvent will never be executed and the
> rubber band will not work.

I added that check at the last minute after seeing some issues, but I guess
I should have tested it a bit more. You should be able to remove that check.
I'll verify this a bit later.

David Boddie
Senior Technical Writer
Nokia, Qt

More information about the PyQt mailing list