This commit is contained in:
恍兮惚兮 2024-08-05 20:14:27 +08:00
parent 8761f09c0f
commit f7b6b96aef

View File

@ -171,9 +171,9 @@ class AnkiWindow(QWidget):
margin0=True, margin0=True,
) )
) )
self.fronttext = QPlainTextEdit() self.fronttext = QPlainTextEdit1()
self.backtext = QPlainTextEdit() self.backtext = QPlainTextEdit1()
self.csstext = QPlainTextEdit() self.csstext = QPlainTextEdit1()
edittemptab.addTab(self.fronttext, "正面") edittemptab.addTab(self.fronttext, "正面")
edittemptab.addTab(self.backtext, "背面") edittemptab.addTab(self.backtext, "背面")
edittemptab.addTab(self.csstext, "样式") edittemptab.addTab(self.csstext, "样式")
@ -375,14 +375,14 @@ class AnkiWindow(QWidget):
self.editpath.setReadOnly(True) self.editpath.setReadOnly(True)
self.viewimagelabel = QLabel() self.viewimagelabel = QLabel()
self.editpath.textChanged.connect(self.wrappedpixmap) self.editpath.textChanged.connect(self.wrappedpixmap)
self.example = QPlainTextEdit() self.example = QPlainTextEdit1()
self.example.hiras = None self.example.hiras = None
def __(): def __():
self.example.hiras = None self.example.hiras = None
self.example.textChanged.connect(__) self.example.textChanged.connect(__)
self.remarks = QPlainTextEdit() self.remarks = QPlainTextEdit1()
recordbtn1 = statusbutton(icons=["fa.microphone", "fa.stop"], colors=["", ""]) recordbtn1 = statusbutton(icons=["fa.microphone", "fa.stop"], colors=["", ""])
recordbtn1.statuschanged.connect( recordbtn1.statuschanged.connect(
functools.partial(self.startorendrecord, self.audiopath) functools.partial(self.startorendrecord, self.audiopath)
@ -655,6 +655,12 @@ class QLineEdit1(QLineEdit):
windows.SetFocus(int(self.winId())) windows.SetFocus(int(self.winId()))
return super().mousePressEvent(a0) return super().mousePressEvent(a0)
class QPlainTextEdit1(QPlainTextEdit):
def mousePressEvent(self, a0: QMouseEvent) -> None:
# 点击浏览器后,无法重新获取焦点。
windows.SetFocus(int(self.winId()))
return super().mousePressEvent(a0)
class searchwordW(closeashidewindow): class searchwordW(closeashidewindow):
search_word = pyqtSignal(str, bool) search_word = pyqtSignal(str, bool)