examples/tools/customcompleter/textedit.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   139            break;
   139            break;
   140        }
   140        }
   141     }
   141     }
   142 
   142 
   143     bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E
   143     bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E
   144     if (!c || !isShortcut) // dont process the shortcut when we have a completer
   144     if (!c || !isShortcut) // do not process the shortcut when we have a completer
   145         QTextEdit::keyPressEvent(e);
   145         QTextEdit::keyPressEvent(e);
   146 //! [7]
   146 //! [7]
   147 
   147 
   148 //! [8]
   148 //! [8]
   149     const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);
   149     const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);