mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
fix
This commit is contained in:
parent
308982b3f0
commit
0c90c6ca7d
@ -104,11 +104,11 @@ class ctrlenter(QPlainTextEdit):
|
|||||||
enterpressed = pyqtSignal()
|
enterpressed = pyqtSignal()
|
||||||
|
|
||||||
def keyPressEvent(self, e):
|
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 (
|
if (
|
||||||
e.modifiers() == Qt.ControlModifier
|
e.modifiers() == Qt.KeyboardModifier.ControlModifier
|
||||||
or e.modifiers() == Qt.ShiftModifier
|
or e.modifiers() == Qt.KeyboardModifier.ShiftModifier
|
||||||
or e.modifiers() == Qt.AltModifier
|
or e.modifiers() == Qt.KeyboardModifier.AltModifier
|
||||||
):
|
):
|
||||||
self.insertPlainText("\n")
|
self.insertPlainText("\n")
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user