In Qt docs EnterEditFocus is a event about an editor widget gaining focus for editing but using Qt 4.5.3 the compilation fails with ‘EnterEditFocus’ is not a member of ‘QEvent’. What's wrong?
+1
A:
You probably forgot to include QEvent
.
Most of Qt classes are forward declared, try adding:
#include <QtCore/QEvent>
Idan K
2010-01-12 16:51:03
You shouldn't need to specify QtCore, but it certainly won't hurt.
Kaleb Pederson
2010-01-12 17:02:21
Thanks for your answer, but didn't work. Changing to QEvent::Enter the compilation is successful even leaving that #include out.
Humberto Pinheiro
2010-01-12 17:13:49
+2
A:
If Idan's suggestion doesn't work, note that QEvent::EnterEditFocus isn't defined unless you built Qt with QT_KEYPAD_NAVIGATION defined. Refer to the following documentation:
http://doc.trolltech.com/4.5/qapplication.html#keypadNavigationEnabled
RA
2010-01-12 17:06:36