QGraphicsSceneMouseEvent::button() returns the mouse button that causes the event to happen. Since mouse movement is not related to pressing a mouse button, button() probably returns Qt::NoButton. Try this instead:
Qt Code:
if(e->buttons() & Qt::LeftButton) { ... }To copy to clipboard, switch view to plain text mode
Bookmarks