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

Method requestStarted

QWebEngineView/BlockRequestData.py:30–35  ·  view source on GitHub ↗
(self, job)

Source from the content-addressed store, hash-verified

28class UrlSchemeHandler(QWebEngineUrlSchemeHandler):
29
30 def requestStarted(self, job):
31 url = job.requestUrl().toString()
32 if url == 'myurl://png':
33 file = QFile('Data/app.png', job)
34 file.open(QIODevice.ReadOnly)
35 job.reply(b'image/png', file)
36
37
38# 请求拦截器

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected