yes, i am comparing pointers to the event objects. what else can i compare?
the comparison operator for QEvent objects is not defined.
may be i do not understand well what you do mean . Here is my code:
{
if (event
->type
() = QEvent::KeyPress) {
// mLastProcessedEvent is a member in MyEasterEgg
if (event == mLastProcessedEvent )
return false;
mLastProcessedEvent = event;
/* The rest is the code for my custom behaviour */
}
return false;
}
bool MyEasterEgg::eventFilter(QObject* obj, QEvent* event)
{
if (event->type() = QEvent::KeyPress)
{
// mLastProcessedEvent is a member in MyEasterEgg
if (event == mLastProcessedEvent )
return false;
mLastProcessedEvent = event;
/* The rest is the code for my custom behaviour */
}
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks