rssguard/src/gui/baselineedit.cpp
2013-07-17 20:42:42 +02:00

20 lines
394 B
C++

#include <QKeyEvent>
#include "gui/baselineedit.h"
BaseLineEdit::BaseLineEdit(QWidget *parent) : QLineEdit(parent) {
}
BaseLineEdit::~BaseLineEdit() {
}
void BaseLineEdit::keyPressEvent(QKeyEvent *event) {
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
emit submitted(text());
event->accept();
}
QLineEdit::keyPressEvent(event);
}