mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
308982b3f0
commit
0c90c6ca7d
@ -104,11 +104,11 @@ class ctrlenter(QPlainTextEdit):
|
||||
enterpressed = pyqtSignal()
|
||||
|
||||
def keyPressEvent(self, e):
|
||||
if e.key() == Qt.Key_Return or e.key() == Qt.Key_Enter:
|
||||
if e.key() == Qt.Key.Key_Return or e.key() == Qt.Key.Key_Enter:
|
||||
if (
|
||||
e.modifiers() == Qt.ControlModifier
|
||||
or e.modifiers() == Qt.ShiftModifier
|
||||
or e.modifiers() == Qt.AltModifier
|
||||
e.modifiers() == Qt.KeyboardModifier.ControlModifier
|
||||
or e.modifiers() == Qt.KeyboardModifier.ShiftModifier
|
||||
or e.modifiers() == Qt.KeyboardModifier.AltModifier
|
||||
):
|
||||
self.insertPlainText("\n")
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user