MCPcopy Create free account
hub / github.com/PyQt5/PyQt / onLoadFinished

Method onLoadFinished

QWebView/ScreenShotPage.py:93–105  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91 self.btnMethod2.setText('暂时无法使用(等待页面加载完成)')
92
93 def onLoadFinished(self):
94 # 注入脚本
95 mainFrame = self.webView.page().mainFrame()
96 # 执行jquery,promise,html2canvas
97 mainFrame.evaluateJavaScript(
98 open('Data/jquery.js', 'rb').read().decode())
99 mainFrame.evaluateJavaScript(
100 open('Data/promise-7.0.4.min.js', 'rb').read().decode())
101 mainFrame.evaluateJavaScript(
102 open('Data/html2canvas.min.js', 'rb').read().decode())
103 print('inject js ok')
104 self.btnMethod2.setText('截图2')
105 self.btnMethod2.setEnabled(True)
106
107 def onScreenShot1(self):
108 # 截图方式1

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.45

Tested by

no test coverage detected