you dont have to tear apart your code to search for keyevent.
just put eventFilter() in your main widget. and see where the keys are going
qApp->installEventFilter(this);
bool MainWidgetThatContainsGrphViewAndItems
::eventFilter(QObject* o,
QEvent* e
) {
if(e
->type
()==QEvent::KeyPress) {
qWarning()<<"The bad guy which steals the keyevent is"<<o;
}
return false;
}
qApp->installEventFilter(this);
bool MainWidgetThatContainsGrphViewAndItems::eventFilter(QObject* o,QEvent* e)
{
if(e->type()==QEvent::KeyPress)
{
qWarning()<<"The bad guy which steals the keyevent is"<<o;
}
return false;
}
To copy to clipboard, switch view to plain text mode
easy!!
edit: do tell us who was stealing.
Bookmarks