예제 #1
0
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);
}
예제 #2
0
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