#include <QGraphicsView>
#include <QGraphicsPixmapItem>
#include <QGraphicsSceneMouseEvent>
+#include <QScrollBar>
MonitorScene::MonitorScene(Render *renderer, QObject* parent) :
slotZoomOut(5);
}
} else {
- QGraphicsScene::wheelEvent(event);
+ QAbstractSlider::SliderAction action;
+ if (event->delta() > 0)
+ action = QAbstractSlider::SliderSingleStepSub;
+ else
+ action = QAbstractSlider::SliderSingleStepAdd;
+ if (event->orientation() == Qt::Horizontal)
+ m_view->horizontalScrollBar()->triggerAction(action);
+ else
+ m_view->verticalScrollBar()->triggerAction(action);
}
event->accept();