[Interest] Unable to call QKeyEvent::key()

bb6xt at yahoo.com bb6xt at yahoo.com
Tue Jan 29 09:22:06 CET 2013


Hi,
Much as it gets boring seeing posts which start with *noob alert* warnings I am kind of in the same position right now. However, I have used Qt extensively via PySide though am just starting off with c++/Qt.
I am trying to reimplement the keyPressEvent on a class which inherits QMainWindow but if I call event->key() it throws an error saying "invalid use of incomplete type 'class QKeyEvent' from /opt/lib/Qt5.0.0/5.0.0/gcc/include/QtWidgets/qmainwindow.h:45:0".
The constructor is:
void Window::keyPressEvent(QKeyEvent *event). I installed Qt using the latest Qt5 installer on Ubuntu 12.10.
Thanks in advance.
- Ab.

--------------------------
Sent from my mobile device


More information about the Interest mailing list