View Full Version : Events

10th November 2011, 12:31
Hai all,

If I reimplement any event in my application , will the default event get executed?

For Example, I reimplemented wheelEvent in my program and I am doing nothing in that event handler.While executing program, if I use mouse wheel will it go to default or to my handler?


10th November 2011, 15:08
If it's reimplemented, it should go to the reimplemented function in your class.

When in trouble, you could test things like that with qDebug. Just pass a message to display on the Application Output panel to be sure it's working.

#include <QDebug>
void MyClass::wheelEvent (QWheelEvent * event){
qDebug() << "Wheel scrolled!";