Qt Mouse Scroll
- 1 minQt deal with Mouse Scroll Event
bool QDialog::eventFilter(QObject *target, QEvent *event)
{
if (target == *SomeQGraphicsScene*)
{
if (event->type() == QEvent::GraphicsSceneWheel)
{
const QGraphicsSceneWheelEvent * const me = static_cast<const QGraphicsSceneWheelEvent*>(event);
/* deal with me->delta() */
return true;
}
}
return false;
}