Sorry for my beginner's question... What is the easiest way to define procedures, which are executed when MousePressEvent or MouseReleaseEvent occurs?
For now I am defining my own class (MyGraphicsView class), which inherits QGraphicsView and I am reimplementing mouse events (which are virtual functions). It works fine but is there any way to solve this problem without a need to define a new class? Can I connect Events with Slots somehow?
Thanks for your help.
This thread on the Qt Centre forum describes quite well what your options are. Simply put:
Do what you are doing (ie subclassing and reimplementing)
Work with an event filter as described in the thread and link therein.