This commit is contained in:
恍兮惚兮 2024-04-29 15:04:59 +08:00
parent d8f931c7ff
commit c4ce5ac888
2 changed files with 7 additions and 5 deletions

View File

@ -292,7 +292,7 @@ class browserdialog(QDialog):
if self.webviewv == 0:
self.browser = winsharedutils.HTMLBrowser(int(self.winId()))
elif self.webviewv == 1:
from webviewpy import Webview, declare_library_path
from webviewpy import Webview, declare_library_path, webview_exception
declare_library_path(
os.path.abspath(
@ -303,9 +303,11 @@ class browserdialog(QDialog):
)
)
)
self.browser = Webview(
False, int(self.winId())
) # 构造函数里会触发ResizeEvent。虽然确实有问题但很奇怪前一天晚上正常第二天起来就崩溃了。
try:
self.browser = Webview(False, int(self.winId()))
except webview_exception:
self.browser = winsharedutils.HTMLBrowser(int(self.winId()))
self.webviewv == 0
self.setWindowTitle(savehook_new_data[self.exepath]["title"])
self.nettab = QTabWidget(self)
self.nettab.setFixedHeight(self.nettab.tabBar().height())

View File

@ -1,6 +1,6 @@
PyQt5==5.15.10
PyQt5-Qt5==5.15.2
webviewpy==1.0.1
webviewpy==1.0.2
nuitka==2.0.5
imageio
pefile