diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-10-11 12:28:05 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-10-11 12:28:05 (GMT) |
commit | 791ff94dc3b3a01798ce0bf1243de228b3c19e25 (patch) | |
tree | 8138e5363f9e98805ccecb7eac0df7a0a8b9a500 /src/gui/itemviews/qabstractitemview.cpp | |
parent | ae37a39a16c0d28d69fe9e0295ec619d899dc518 (diff) | |
download | Qt-791ff94dc3b3a01798ce0bf1243de228b3c19e25.zip Qt-791ff94dc3b3a01798ce0bf1243de228b3c19e25.tar.gz Qt-791ff94dc3b3a01798ce0bf1243de228b3c19e25.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/gui/itemviews/qabstractitemview.cpp')
-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 0842ee8..b5ca812 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -4101,13 +4101,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; } |