Re: QWheelEvent not working in event(QEvent*e) reimplementation
Hello
I am trying to catch the wheel event of my QGraphicsView subclass and for this I am reimplementing the event() method. When I do :
Code:
bool GraphicsView
::event(QEvent* event
) {
if(event
->type
() == QEvent::Wheel){ qDebug("ENTERED")
return false;
}
}
This is just to test and I noticed that when I move the wheel the if statement never gets accessed. What is the proper way to say "if the event is a mouse wheel event" to be able to implement what I need inside the if statement??
Thanks.
Added after 24 minutes:
Found the problem, since I already also had an implementation of the wheelEvent in my QGV class I just forgot to call the super class in my implementation.
Adding QGraphicsView::wheelEvent() made the above work as expected
Re: QWheelEvent not working in event(QEvent*e) reimplementation
Why not just reimplement wheelEvent in the first place?