diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-03-09 14:39:40 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-03-09 14:46:04 (GMT) |
commit | 42b69b1383375a52818758bf89198e8dc97902d3 (patch) | |
tree | 30b0257ea2276daac64416ffdc2ca09c0b1ee86c /src/gui/widgets | |
parent | 6ccf78b9675f50691bd6abc878c2b0d5281c0a51 (diff) | |
download | Qt-42b69b1383375a52818758bf89198e8dc97902d3.zip Qt-42b69b1383375a52818758bf89198e8dc97902d3.tar.gz Qt-42b69b1383375a52818758bf89198e8dc97902d3.tar.bz2 |
Cursor would remain in a non-focused QLineEdit after clearing its selection
QLineEditPrivate::_q_selectionChanged() did not take into account
whether the widget had focus.
Reviewed-by: Olivier
Task-number: QTBUG-8634
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlineedit_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index 2c76a5c..468c111 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -134,7 +134,7 @@ void QLineEditPrivate::_q_selectionChanged() q->initStyleOption(&opt); bool showCursor = control->hasSelectedText() ? q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q): - true; + q->hasFocus(); setCursorVisible(showCursor); } |