void DebugAnyCommandWidget::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) processCommand(); if (event->key() == Qt::Key_Up) showPreviousCommand(); if (event->key() == Qt::Key_Down) showNextCommand(); QWidget::keyPressEvent(event); }
void InputWidget::keyPressEvent( QKeyEvent* _event ) { if ( _event->key() == Qt::Key_Up ) showPreviousCommand(); else if ( _event->key() == Qt::Key_Down ) showNextCommand(); else QLineEdit::keyPressEvent( _event ); } // InputWidget::keyPressEvent