diff --git a/LunaTranslator/LunaTranslator/gui/showword.py b/LunaTranslator/LunaTranslator/gui/showword.py index bcd60368..7cea4a3d 100644 --- a/LunaTranslator/LunaTranslator/gui/showword.py +++ b/LunaTranslator/LunaTranslator/gui/showword.py @@ -719,7 +719,7 @@ class searchwordW(closeashidewindow): super(searchwordW, self).__init__(parent, globalconfig, "sw_geo") # self.setWindowFlags(self.windowFlags()&~Qt.WindowMinimizeButtonHint) self.getnewsentencesignal.connect(self.getnewsentence) - + self.setWindowTitle(_TR("查词")) self.ankiwindow = AnkiWindow() self.setupUi() diff --git a/LunaTranslator/LunaTranslator/gui/usefulwidget.py b/LunaTranslator/LunaTranslator/gui/usefulwidget.py index 2850ee5c..b52b2005 100644 --- a/LunaTranslator/LunaTranslator/gui/usefulwidget.py +++ b/LunaTranslator/LunaTranslator/gui/usefulwidget.py @@ -677,12 +677,14 @@ class auto_select_webview(QWidget): super().__init__(parent) self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self.cantusewebview2 = False - self.internal = None + self.internal = ( + QWidget() + ) # 加个占位的widget,否则等待加载的时候有一瞬间的灰色背景。 self.contex = -1 layout = QHBoxLayout() layout.setContentsMargins(0, 0, 0, 0) + layout.addWidget(self.internal) self.setLayout(layout) - self._maybecreate() self.lastcachehtml = None def _maybecreate(self):