delayload

This commit is contained in:
恍兮惚兮 2024-05-30 18:56:53 +08:00
parent 3b27faf942
commit 0e80480113
2 changed files with 5 additions and 3 deletions

View File

@ -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()

View File

@ -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):