Int notifyNum=0;
Application: Application (int & amp; Arg c, char * * argv) : QApplication (arg c, argv)
{
}
Bool Application: : notify (QObject * obj, QEvent * event)
{
The static bool status=true;
If (event - & gt; The type ()==QEvent: : KeyPress)
{
QDebug () & lt; <"NotifyNum:" & lt;
}
Return QApplication: : notify (obj, event);
}
Why every keystroke print two qDebug () & lt; <"NotifyNum:" & lt;