title: QWebView - dealing with javascript infinite loop
body: <p>web_view_crash.py</p>
  
  <pre><code>import sys
  
  from PyQt4.QtGui import *
  from PyQt4.QtCore import *
  from PyQt4.QtWebKit import *
  
  app = QApplication(sys.argv)
  view = QWebView()
  view.settings().setAttribute(QWebSettings.JavascriptEnabled, True)
  view.load(QUrl('infinite_loop.html'))
  view.show()
  app.exec_()
  </code></pre>
  
  <p>infinite_loop.html</p>
  
  <pre><code>&lt;script&gt;
      while(true) {
          document.write('infinite loop...')}
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to fix this from my python code, without touching the javascript.  Can I kill the javascript somehow?  </p>
  
  <p>Edit: Both files are local.</p>