Thanks a lot for replies.
@MrDeath: I guess my opengl componet has focus, because I draw some objects without porblems (actually, I want that if user press ESC, drawing is cancelled)
@Lykurg: I wrote these lines in my window class:
if(event
->type
() == QEvent::KeyPress) { qDebug(obj->objectName().toAscii());
return true;
} else {
return QObject::eventFilter(obj, event
);
}
}
bool CEditor::eventFilter(QObject *obj, QEvent *event) {
if(event->type() == QEvent::KeyPress) {
qDebug(obj->objectName().toAscii());
return true;
} else {
return QObject::eventFilter(obj, event);
}
}
To copy to clipboard, switch view to plain text mode
And this in the main window constructor installEventFilter(this);
But everytime I press a key, I see CEditorClass, I never see any other string and it doesn't matter if I pressthe key on other object. BTW, it seems SPACE does not work.
Any idea? Honesly, I don't know what going on is.
Thanks in advance.
Bookmarks