summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/tagwidget.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp
index 673242cfa..b0912addb 100644
--- a/qt-ui/tagwidget.cpp
+++ b/qt-ui/tagwidget.cpp
@@ -152,6 +152,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e) {
switch (e->key()) {
case Qt::Key_Return:
case Qt::Key_Enter:
+ case Qt::Key_Tab:
/*
* Fake the QLineEdit behaviour by simply
* closing the QAbstractViewitem
@@ -162,6 +163,13 @@ void TagWidget::keyPressEvent(QKeyEvent *e) {
popup->hide();
}
}
- GroupedLineEdit::keyPressEvent(e);
+ if (e->key() == Qt::Key_Tab) { // let's pretend this is a comma instead
+ QKeyEvent *fakeEvent = new QKeyEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(","));
+ qDebug() << "sending comma instead";
+ GroupedLineEdit::keyPressEvent(fakeEvent);
+ free(fakeEvent);
+ } else {
+ GroupedLineEdit::keyPressEvent(e);
+ }
}