diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-04-03 12:28:07 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-04-03 12:28:07 (GMT) |
commit | 0ac4fd86b62f418b4e366afa86c75d7775e9da90 (patch) | |
tree | a9ca9c8b924de174c9958e69df361440bb6b74aa /src/gui/util | |
parent | 0bb93751c80109a13f6391c8bbfb74693b484699 (diff) | |
parent | f9e0b4e7d57b568ab20b7c77e284f966ff6baf41 (diff) | |
download | Qt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.zip Qt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.tar.gz Qt-0ac4fd86b62f418b4e366afa86c75d7775e9da90.tar.bz2 |
Merge branch '4.5'
Diffstat (limited to 'src/gui/util')
-rw-r--r-- | src/gui/util/qcompleter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index aeb7e91..7571dfe 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -1079,7 +1079,14 @@ void QCompleter::setPopup(QAbstractItemView *popup) popup->setModel(d->proxy); popup->hide(); popup->setParent(0, Qt::Popup); + + Qt::FocusPolicy origPolicy; + if (d->widget) + origPolicy = d->widget->focusPolicy(); popup->setFocusPolicy(Qt::NoFocus); + if (d->widget) + d->widget->setFocusPolicy(origPolicy); + popup->setFocusProxy(d->widget); popup->installEventFilter(this); popup->setItemDelegate(new QCompleterItemDelegate(popup)); |