In my QWebPage, I'd like to override the <meta charset="utf-8">shouldInterruptJavaScript method so that it ignores long running javascript warning.  <div><meta charset="utf-8"><br class="Apple-interchange-newline"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html#shouldInterruptJavaScript">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html#shouldInterruptJavaScript</a></div>
<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="arial, helvetica, sans-serif"><b>Warning:</b> Because of binary compatibility constraints, this function is not virtual. If you want to provide your own implementation in a <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html" style="color: rgb(0, 79, 175); text-decoration: none; ">QWebPage</a> subclass, reimplement the shouldInterruptJavaScript() slot in your subclass instead. <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtwebkit.html" style="color: rgb(0, 79, 175); text-decoration: none; ">QtWebKit</a> will dynamically detect the slot and call it.</font></blockquote>
<div><br></div><div>However, when I override it, it appears to never be called.<div><br></div><div><div>class DebugWebPage(QWebPage):</div><div><br></div><div>    @pyqtSlot(bool)</div><div>    def shouldInterruptJavaScript(self):</div>
<div>        print 'not interrupting'</div><div>        return False</div><div><br></div><div>It looks like someone else hit the same issue with PySide:</div><div><br></div><div><a href="http://stackoverflow.com/questions/6868286/override-shouldinterruptjavascript-in-qwebpage-with-pyside">http://stackoverflow.com/questions/6868286/override-shouldinterruptjavascript-in-qwebpage-with-pyside</a></div>
<div><br></div><div>I'm tried with and without the pyqtSlot decorator with the same results.</div></div></div><div><br></div><div>Insight appreciated,</div><div>BZ</div>