mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
*! No typing event can occur if Ctrl, Alt or Shift is pressed.
This commit is contained in:
parent
e93084f96b
commit
5d95a6a17a
|
@ -242,6 +242,10 @@ bool ArticleView::eventFilter( QObject * obj, QEvent * ev )
|
||||||
{
|
{
|
||||||
QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev );
|
QKeyEvent * keyEvent = static_cast< QKeyEvent * >( ev );
|
||||||
|
|
||||||
|
if ( keyEvent->modifiers() &
|
||||||
|
( Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier ) )
|
||||||
|
return false; // A non-typing modifier is pressed
|
||||||
|
|
||||||
if ( keyEvent->key() == Qt::Key_Space ||
|
if ( keyEvent->key() == Qt::Key_Space ||
|
||||||
keyEvent->key() == Qt::Key_Backspace ||
|
keyEvent->key() == Qt::Key_Backspace ||
|
||||||
keyEvent->key() == Qt::Key_Tab )
|
keyEvent->key() == Qt::Key_Tab )
|
||||||
|
|
Loading…
Reference in a new issue