[PyQt] wrap QApplication::exec() into a function or class
Zhao Lee
redstone-cold at 163.com
Sat Aug 6 05:42:26 BST 2016
I want the following code to get the request url starting with http://down.51en.com:88 during the web loading process ,
code here
https://bpaste.net/show/120af9114a8e
once targetUrl is assigned a value , I want the function targetUrlGetter(url) to return it to the caller, however , the problem is that QApplication::exec() hanged the program , so the function cannot return , I have tried with qApp.quit() in interceptRequest(self, info) in order to tell the application to exit so that targetUrlGetter(url) can return , but the function still cannot return and the program even crashes on exit(tested on win7 32bit), so how can I return the targetUrl to the caller program ?
BTW, I am going to use the code at (Django) web server side.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160806/9a15b7a1/attachment-0001.html>
More information about the PyQt
mailing list