Hi everyone,
I want to detect key press and mouse event from any widget. So I inherit QApplication and re implement the notify function.
I am able to detect mouse and key press event from any widget. But in some widget key press is not working fine. In lineEdit texts are not able to print escape key is not working in some widget.....
But if i remove the implementation of notify the all things are fine.
{
Q_OBJECT
public:
MyApplication(int argc ,char** argv);
};
class MyApplication : public QApplication
{
Q_OBJECT
public:
MyApplication(int argc ,char** argv);
bool notify(QObject *obj, QEvent *e);
};
To copy to clipboard, switch view to plain text mode
{
return obj->event(e);
}
bool MyApplication::notify(QObject *obj, QEvent *e)
{
return obj->event(e);
}
To copy to clipboard, switch view to plain text mode
Can anybody please tell me what is the problem ?
thanks.
Bookmarks