Re: keyPressEvent problem
You can't catch the tab key in keyPressEvent. Override event() instead.
Code:
bool MyClass
:event
( QEvent *evt
) { if ( evt
->type
() == QEvent::KeyPress ) { if ( ke->key() == Key_Tab ) {
// special tab handling here
ke->accept();
return TRUE;
}
}
}
Re: keyPressEvent problem
" QKeyEvent *ke = (QKeyEvent *)evt; "
I couldn't do this conversion. IDE always appers this message "unused variable 'ke' ".I think there is some thing wrong here.
deneme.cpp:27: warning: unused variable 'ke'
deneme.cpp:28: error: `ke' undeclared (first use this function)
Re: keyPressEvent problem
There must be some typing mistake,,, can u post the code part which is giving error ??
Re: keyPressEvent problem
okay i solve this problem.