summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp3
-rw-r--r--qt-ui/tagwidget.cpp6
-rw-r--r--qt-ui/tagwidget.h1
3 files changed, 8 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 4258d093a..f3f85b05e 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -305,8 +305,7 @@ bool MainTab::eventFilter(QObject* object, QEvent* event)
// FocusIn for the starWidgets or RequestSoftwareInputPanel for tagWidget start the editing
if ((event->type() == QEvent::MouseButtonPress) ||
(event->type() == QEvent::KeyPress && object == ui.dateTimeEdit) ||
- (event->type() == QEvent::FocusIn && (object == ui.rating || object == ui.visibility || object == ui.buddy)) ||
- (event->type() == QEvent::RequestSoftwareInputPanel && object == ui.tagWidget)) {
+ (event->type() == QEvent::FocusIn && (object == ui.rating || object == ui.visibility || object == ui.buddy || object == ui.tagWidget))) {
tabBar()->setTabIcon(currentIndex(), QIcon(":warning"));
enableEdition();
}
diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp
index dc78c8997..e7585dff1 100644
--- a/qt-ui/tagwidget.cpp
+++ b/qt-ui/tagwidget.cpp
@@ -27,6 +27,7 @@ TagWidget::TagWidget(QWidget *parent) : GroupedLineEdit(parent), m_completer(NUL
addColor( QColor(Qt::green).darker(120) );
addColor( QColor(Qt::blue).darker(120) );
} // light text. get a dark background.
+ setFocusPolicy(Qt::StrongFocus);
}
void TagWidget::setCompleter(QCompleter *completer)
@@ -187,3 +188,8 @@ void TagWidget::keyPressEvent(QKeyEvent *e) {
}
}
+void TagWidget::wheelEvent(QWheelEvent *event) {
+ if (hasFocus()) {
+ GroupedLineEdit::wheelEvent(event);
+ }
+}
diff --git a/qt-ui/tagwidget.h b/qt-ui/tagwidget.h
index b9c1619f9..1f5cc2d3e 100644
--- a/qt-ui/tagwidget.h
+++ b/qt-ui/tagwidget.h
@@ -16,6 +16,7 @@ public:
void setText(QString text);
void clear();
void setCursorPosition(int position);
+ void wheelEvent(QWheelEvent *event);
public slots:
void reparse();
void completionSelected(QString);