Hello!
A few days ago I posted a post on forum.qt.io entitled What happened to the QGraphicsSceneMouseEvent::button() function?
Here I do the same to see if someone has happened or tried the same code.

Qt Code:
  1. Hi!!
  2. I have next code;
  3.  
  4. void Test::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
  5. {
  6.  
  7. qDebug()<<"MouseMove"<<event->button();
  8. if (event->button() != Qt::LeftButton){
  9. //Always execute
  10. return;
  11. }
  12. QGraphicsScene::mouseMoveEvent(event);
  13. }
  14.  
  15. Output:
  16. MouseMove Qt::NoButton
  17.  
  18. Why does the [QTCLASS]QGraphicsSceneMouseEvent::button()[/QTCLASS] function inside the mouseMoveEvent function return Qt::Nobutton?
  19. However mousePressEvent and mouseReleaseEvent function work fine :(
  20. Output :
  21. MousePress Qt::LeftButton
  22. MouseMove Qt::NoButton
  23. MouseMove Qt::NoButton
  24. MouseRelease Qt::LeftButton
To copy to clipboard, switch view to plain text mode 

I have:
Qt Creator 4.9.1
Based on Qt 5.12.3 (MSVC 2017, 32 bit)
Built on May 26 2019 21:17:08
From revision 168e91b618
Copyright 2008-2019 The Qt Company Ltd. All rights reserved.
The version is Qt opensource-windows-x86-5.13.0.
On Windows 10 Pro

You can run "Diagram Scene Example" and executed the same code just after mousePressEvent, mouseMoveEvent and mouseReleaseEvent function, in the DiagramScene class ...
Thanks!!!