I think that it doesn't work because it returns the current state of the buttons and so in release event no buttons are in the pressed state while in mouse move they are. So the same code put in mouseMove will work while it doesn't with mouseRelease. button() on the other hand returns the button that caused the event (regardless of its current state).
Bookmarks