qt mouse event filter
问题 I have a QWidget with a QGraphicsView and a push button. The QGraphicsView has to take mouse press and release events to detect a swipe .At the same time push button should run a small function on clicked. I used an event filter in the QWidget to detect the mouse events. bool Widget::eventFilter(QObject * obj, QEvent * event) { // Capturing keyboard events for moving if( event->type() == QEvent::KeyPress ) { //Do something } //Capturing mouse events for swipe else if( event->type() == QEvent: