summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r--src/gui/text/qtextcontrol.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 5babbc2..ffcd90b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -2029,10 +2029,7 @@ void QTextControlPrivate::focusEvent(QFocusEvent *e)
#endif
))) {
#endif
- cursorOn = (interactionFlags & Qt::TextSelectableByKeyboard);
- if (interactionFlags & Qt::TextEditable) {
- setBlinkingCursorEnabled(true);
- }
+ setBlinkingCursorEnabled(interactionFlags & (Qt::TextEditable | Qt::TextSelectableByKeyboard));
#ifdef QT_KEYPAD_NAVIGATION
}
#endif
@@ -2808,7 +2805,7 @@ void QTextControl::setTextInteractionFlags(Qt::TextInteractionFlags flags)
d->interactionFlags = flags;
if (d->hasFocus)
- d->setBlinkingCursorEnabled(flags & Qt::TextEditable);
+ d->setBlinkingCursorEnabled(flags & (Qt::TextEditable | Qt::TextSelectableByKeyboard));
}
Qt::TextInteractionFlags QTextControl::textInteractionFlags() const