def fanyi(self):
if time.time() - self.time < 0.1:
print("???")
return
self.time = time.time()
if self.ui.textEdit.hasFocus():
return
text = self.clipboard.text(self.clipboard.Selection)
if len(text) > 20:
return
self.mainWindow.move(*self._position())
texttmp = ""
for c in text:
if c.isupper():
texttmp += " " + c
else:
texttmp += c
text = texttmp
text = text.strip(' ')
if text != '':
text = self.wordutil.execfind(text)
self.ui.textEdit.clear()
self.ui.textEdit.insertHtml(text)
评论列表
文章目录