mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
focus
This commit is contained in:
parent
8761f09c0f
commit
f7b6b96aef
@ -171,9 +171,9 @@ class AnkiWindow(QWidget):
|
||||
margin0=True,
|
||||
)
|
||||
)
|
||||
self.fronttext = QPlainTextEdit()
|
||||
self.backtext = QPlainTextEdit()
|
||||
self.csstext = QPlainTextEdit()
|
||||
self.fronttext = QPlainTextEdit1()
|
||||
self.backtext = QPlainTextEdit1()
|
||||
self.csstext = QPlainTextEdit1()
|
||||
edittemptab.addTab(self.fronttext, "正面")
|
||||
edittemptab.addTab(self.backtext, "背面")
|
||||
edittemptab.addTab(self.csstext, "样式")
|
||||
@ -375,14 +375,14 @@ class AnkiWindow(QWidget):
|
||||
self.editpath.setReadOnly(True)
|
||||
self.viewimagelabel = QLabel()
|
||||
self.editpath.textChanged.connect(self.wrappedpixmap)
|
||||
self.example = QPlainTextEdit()
|
||||
self.example = QPlainTextEdit1()
|
||||
self.example.hiras = None
|
||||
|
||||
def __():
|
||||
self.example.hiras = None
|
||||
|
||||
self.example.textChanged.connect(__)
|
||||
self.remarks = QPlainTextEdit()
|
||||
self.remarks = QPlainTextEdit1()
|
||||
recordbtn1 = statusbutton(icons=["fa.microphone", "fa.stop"], colors=["", ""])
|
||||
recordbtn1.statuschanged.connect(
|
||||
functools.partial(self.startorendrecord, self.audiopath)
|
||||
@ -655,6 +655,12 @@ class QLineEdit1(QLineEdit):
|
||||
windows.SetFocus(int(self.winId()))
|
||||
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):
|
||||
search_word = pyqtSignal(str, bool)
|
||||
|
Loading…
x
Reference in New Issue
Block a user