in the same vein as the thread from yesterday. I get an error from this:<br><br>BEGIN PROGRAM-----------------<br><br>import sys<br>from PyQt4.QtGui import *<br>from PyQt4.QtCore import *<br>from PyQt4.QtWebKit import QWebView<br>
from PyQt4.QtNetwork import QNetworkAccessManager<br><br>if __name__ == "__main__":<br> app = QApplication(sys.argv)<br> view = QWebView()<br> view.page().setNetworkAccessManager( QNetworkAccessManager() )<br>
view.page().mainFrame().load( QUrl("<a href="http://www.google.com">http://www.google.com</a>") ) <br> view.show()<br> sys.exit( app.exec_() ) <br><br>----------------------------------------------<br>
<br>This CRASHES upon running, while THIS<br><br><br>
BEGIN PROGRAM-----------------<br>
<br>
import sys<br>
from PyQt4.QtGui import *<br>
from PyQt4.QtCore import *<br>
from PyQt4.QtWebKit import QWebView<br>
from PyQt4.QtNetwork import QNetworkAccessManager<br>
<br>
if __name__ == "__main__":<br>
app = QApplication(sys.argv)<br>
view = QWebView()<br> manager = QNetworkAccessManager() # ADDED LINE, CACHING manager<br>
view.page().setNetworkAccessManager(manager)<br>
view.page().mainFrame().load( QUrl("<a href="http://www.google.com">http://www.google.com</a>") ) <br>
view.show()<br>
sys.exit( app.exec_() ) <br>
<br>
----------------------------------------------<br><br>seems like when I create the QNetworkAccessManager(), it gets destroyed right away after it gets added with setNetworkAccessManager(), however, this should not be the case since QNetworkAccessManager is a QObject and should be properly parented to the QWebPage when its added<br>
<br>lattest nightly builds of PyQt, SIP, Qt4.6, I've tried it on 2 different computers runnning windows 7 and python 2.6<br>