qt::leftbutton can work but qt::middlebutton can't work
-
-
if (event->buttons() & Qt::MiddleButton) { QGraphicsView::mouseMoveEvent(event); } if (event->buttons() & Qt::LeftButton) { QGraphicsView::mouseMoveEvent(event); } if (event->buttons() & Qt::RightButton) { QGraphicsView::mouseMoveEvent(event); }
@Perlman More information would be helpful for others to understand what the problem is.
Do you mean the first if condition is never true?
On what platform are you?
Do you use a mouse, touchpad or touch screen?
What event do you override?