我已经开始使用GUI并且有一个问题。 我已经创建了一个窗口,现在我想将图像设置为背景 我看到它用于帆布,但我不明白如何使用它。 有人可以帮助我/最好的问候
class WebEngineUrlRequestInterceptor(QWebEngineUrlRequestInterceptor):
def __init__(self, parent=None):
super().__init__(parent)
def interceptRequest(self, info):
# info.setHttpHeader("X-Frame-Options", "ALLOWALL")
print("test")
print(info.requestUrl())
class MyWebEnginePage(QWebEnginePage):
# adblocker = Filter(open('easylist.txt', encoding="utf8"))
def __init__(self, parent=None):
super().__init__(parent)
def acceptNavigationRequest(self, url, _type, isMainFrame):
# urlString = url.toString()
# resp = False
# resp = WebPage.adblocker.match(url.toString())
#
# if resp:
# print("Blocking url --- "+url.toString())
# return False
# else:
# print("TYPE", _type)
# return True
print(url)
return QWebEnginePage.acceptNavigationRequest(self, url, _type, isMainFrame)