Hi and welcome
Many ways to do this, but here is my suggestion.
Add a signal to your graphicview class
signals:
void MWheelActivated(bool ZoomIn);
and hook it up to a slot in your mainwindow with the connect function.
http://doc.qt.io/qt-5.5/signalsandslots.html
then in GraphicsView::wheelEvent(QWheelEvent *e)
you
emit MWheelActivated ( (e->delta() > 0));
and No zooming here!
Then in mainwindow slot
mainwindow:: MWheelActivated ( bool ZoomIn )
{
if ( ZoomIn ) {
view1->zoomIn ( 6 );
view2->zoomIn ( 6 );
} else {
view1->zoomOut ( 6 );
view2->zoomOut ( 6 );
}
}
Hope it helps.