diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-10-11 12:28:05 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:24:45 (GMT) |
commit | f91ffcf84808ee24d62d5831ffde42c29d2c56e3 (patch) | |
tree | ff89cdb884f91a1cb66b0ed29fae5307502f0045 /src | |
parent | d8fe434e21c602e0c7ead29a670be065c41ad8e6 (diff) | |
download | Qt-f91ffcf84808ee24d62d5831ffde42c29d2c56e3.zip Qt-f91ffcf84808ee24d62d5831ffde42c29d2c56e3.tar.gz Qt-f91ffcf84808ee24d62d5831ffde42c29d2c56e3.tar.bz2 |
The completer in an itemview would not be activated right away
If you have set the edit triggers to AnyKeyPressed and you press a key
the completer would not kick in because the key event would come before
the lineedit gets focus. The completer is only active when the lineedit
has focus.
Task-number: QTBUG14363
Reviewed-by: ogoffart
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 624b047..2501fcb 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -4097,13 +4097,13 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even if (!w) return false; - if (event) - QApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event); - q->setState(QAbstractItemView::EditingState); w->show(); w->setFocus(); + if (event) + QApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event); + return true; } |