diff --git a/LunaTranslator/LunaTranslator/gui/edittext.py b/LunaTranslator/LunaTranslator/gui/edittext.py index 4a181654..cd1cdeab 100644 --- a/LunaTranslator/LunaTranslator/gui/edittext.py +++ b/LunaTranslator/LunaTranslator/gui/edittext.py @@ -4,7 +4,7 @@ import gobject, qtawesome from myutils.config import globalconfig from myutils.wrapper import Singleton_close from gui.usefulwidget import saveposwindow, getsimplecombobox -from gui.dynalang import LPushButton, LMainWindow, LAction +from gui.dynalang import LPushButton, LMainWindow @Singleton_close @@ -30,11 +30,6 @@ class edittext(saveposwindow): self.textOutput = QPlainTextEdit(self) - self.textOutput.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) - - self.textOutput.customContextMenuRequested.connect(self.showmenu) - # self.setCentralWidget(self.textOutput) - self.textOutput.setUndoRedoEnabled(True) self.textOutput.setReadOnly(False) @@ -87,14 +82,6 @@ class edittext(saveposwindow): ) ) - def showmenu(self, point: QPoint): - menu = QMenu(self.textOutput) - qingkong = LAction(("清空")) - menu.addAction(qingkong) - action = menu.exec(QCursor.pos()) - if action == qingkong: - self.textOutput.clear() - def getnewsentence(self, sentence): if gobject.baseobject.edittextui_sync: self.textOutput.setPlainText(sentence)