Answer the question
In order to leave comments, you need to log in
How to disconnect from page session in QWebView?
I have the following code:
def exec_func_qt(ip, port, user, password, proxy_numb):
QNetworkProxy.setApplicationProxy(
QNetworkProxy(
QNetworkProxy.HttpProxy,
hostName=ip,
port=port,
user=user,
password=password
)
)
app = QApplication(sys.argv)
web = QWebView()
web.load(QUrl("https://google.com/"))
def callback_function():
sleep(3)
app.quit()
def on_load_finished():
t = Thread(target=callback_function)
t.start()
#web.show()
web.loadFinished.connect(on_load_finished)
app.exec_()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question