diff -r dee5afe5301f -r 3f74d0d4af4c src/gui/widgets/qlineedit_p.cpp --- a/src/gui/widgets/qlineedit_p.cpp Mon Mar 15 12:43:09 2010 +0200 +++ b/src/gui/widgets/qlineedit_p.cpp Thu Apr 08 14:19:33 2010 +0300 @@ -129,12 +129,12 @@ void QLineEditPrivate::_q_selectionChanged() { Q_Q(QLineEdit); - if (control->preeditAreaText().isEmpty()) { + if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) { QStyleOptionFrameV2 opt; q->initStyleOption(&opt); bool showCursor = control->hasSelectedText() ? q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q): - true; + q->hasFocus(); setCursorVisible(showCursor); }