This commit is contained in:
Kovid Goyal 2018-11-20 09:17:46 +05:30
parent 53447245c4
commit 01c47148e9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -353,9 +353,12 @@ class LineEdit(QLineEdit, LineEditECM):
def event(self, ev): def event(self, ev):
# See https://bugreports.qt.io/browse/QTBUG-46911 # See https://bugreports.qt.io/browse/QTBUG-46911
if ev.type() == ev.ShortcutOverride and ( try:
ev.key() in (Qt.Key_Left, Qt.Key_Right) and (ev.modifiers() & ~Qt.KeypadModifier) == Qt.ControlModifier): if ev.type() == ev.ShortcutOverride and (
ev.accept() ev.key() in (Qt.Key_Left, Qt.Key_Right) and (ev.modifiers() & ~Qt.KeypadModifier) == Qt.ControlModifier):
ev.accept()
except AttributeError:
pass
return QLineEdit.event(self, ev) return QLineEdit.event(self, ev)
def complete(self, show_all=False, select_first=True): def complete(self, show_all=False, select_first=True):