Your class inherits from QGraphicsScene, which is simply a container for QGraphicsItem instances. It has no visual representation on screen and therefore has no mouse, wheel, or any other input event associated with it.I have installed an event filter in my inherited class "Myclass". But it has no effect.
You probably want to install your event filter on QGraphicsView (and not on a class derived from it, as you have done with your MyClass implementation). It makes no sense to create and install an event filter on an instance of a class itself - if you are going to derive from a class, then simply override the base class methods for the events you want to handle.
The purpose of an event filter is so you can watch events occurring in an instance of one class from a different class. So in your case, you should create the event filter method in your MainWindow class (for example) and install it on your QGraphicsView class.
Bookmarks