Hi All
In my application, One system is is connect to another system (Client server type application.) I can lock the client the client from master side. If client is locked then a widget is displayed in client side. whicjh should grab all keyboard and mouse event. current all key board event are filrterout excep ALT+CTRL+DEl. inorder to do it i did like following
void CLockWidget
::keyPressEvent(QKeyEvent *i_KeyEvent
) {
//const QKeyEvent *keyEv = static_cast<QKeyEvent *>(i_Event);
if(i_KeyEvent->key() == Qt::Key_Delete)
{
i_KeyEvent->ignore();
}
else if(i_KeyEvent->key() == Qt::Key_Alt)
{
i_KeyEvent->ignore();
}
else if(i_KeyEvent->key() == Qt::Key_Control)
{
i_KeyEvent->ignore();
}
}
void CLockWidget::keyPressEvent(QKeyEvent *i_KeyEvent)
{
//const QKeyEvent *keyEv = static_cast<QKeyEvent *>(i_Event);
if(i_KeyEvent->key() == Qt::Key_Delete)
{
i_KeyEvent->ignore();
}
else if(i_KeyEvent->key() == Qt::Key_Alt)
{
i_KeyEvent->ignore();
}
else if(i_KeyEvent->key() == Qt::Key_Control)
{
i_KeyEvent->ignore();
}
}
To copy to clipboard, switch view to plain text mode
But its not filtering out. How to it.
Bookmarks