Can mouse events only be captured by a class? Or can any specific widget capture an event? For instance, I have a video player window that uses a QAxWidget. This video player window has a series of buttons and sliders. I only want to capture the mouse events that occur within the actual video window itself, not the buttons.
Code:
mpVideoPlayer->setCursor( Qt::CrossCursor );
Code:
{ if( event->button() == Qt::LeftButton ) { } else if( event->button() == Qt::RightButton ) { } }
When running this code, all events are captured no matter where in the VideoViewerWindow class. However, when I try to put mpVideoPlayer->accept() I get compile errors. Do I have to make mpVideoPlayer a subclass of QAxWidget for this to work?
Thanks