// For license of this file, see /LICENSE.md. #include "gui/baselineedit.h" #include BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {} BaseLineEdit::~BaseLineEdit() {} void BaseLineEdit::submit(const QString& text) { setText(text); emit submitted(text); } void BaseLineEdit::keyPressEvent(QKeyEvent* event) { if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) { emit submitted(text()); event->accept(); } QLineEdit::keyPressEvent(event); }