Fix cursor disappearance in QLineEdit on Mac when deleting all text
On Mac OS X, if all text in the QLineEdit was selected and then deleted, cursor visibility was not updated, and so the cursor remained hidden. Fixed to update cursor visibility also when the text is empty. Task-number: QTBUG-13169 Change-Id: Id52a20b07bb96609a78c42eb630ee2b20ed7cbcb Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit 181456d0a31b7250da97eafba75e6bc657391777)
This commit is contained in:
parent
06abf7934b
commit
2c8a0a90be
@ -133,7 +133,7 @@ void QLineEditPrivate::_q_editFocusChange(bool e)
|
||||
void QLineEditPrivate::_q_selectionChanged()
|
||||
{
|
||||
Q_Q(QLineEdit);
|
||||
if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) {
|
||||
if (control->preeditAreaText().isEmpty()) {
|
||||
QStyleOptionFrameV2 opt;
|
||||
q->initStyleOption(&opt);
|
||||
bool showCursor = control->hasSelectedText() ?
|
||||
|
Loading…
Reference in New Issue
Block a user