[Qgis-developer] JS error in QtWebKit.QWebView - no error in IE11 or Chrome/Win

Luigi Pirelli luipir at gmail.com
Fri Jan 22 12:01:48 PST 2016


sorry... was another problems to avoid stop bye qt debugger

but could be a snippet useful in case of problems... I use
DebugWebPageinstead of directly the webPage.

about your problem... whou it be set as slot?

this is th esnippet that does not solve our problem but others

class DebugWebPage(QtWebKit.QWebPage):
    ''' custom webpage used to avoid interruption of messagebox by QT
during debugging
    '''
    def __init__(self, parent):
        super(DebugWebPage, self).__init__(parent)

    @QtCore.pyqtSlot()
    def shouldInterruptJavaScript(self):
        return False
Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************


On 22 January 2016 at 20:58, Luigi Pirelli <luipir at gmail.com> wrote:
> no...it's a bug of the webview.. Idid the same problems with the
> QTraffic plugi nand I solved. Let me find the code
> Luigi Pirelli
>
> **************************************************************************************************
> * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
> * LinkedIn: https://www.linkedin.com/in/luigipirelli
> * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
> * GitHub: https://github.com/luipir
> * Mastering QGIS:
> https://www.packtpub.com/application-development/mastering-qgis
> **************************************************************************************************
>
>
> On 22 January 2016 at 18:14, Tom Chadwin <tom.chadwin at nnpa.org.uk> wrote:
>> I've got this working largely as I want - I now have a devtools inspector in
>> my plugin dialog which F12 toggles (download qgis2web master from Github to
>> see it).
>>
>> I would like to toggle the inspector automatically if there is a JS error in
>> the QWebPage/QWebView. I imagine this is done by subclassing
>> javaScriptConsoleMessage(). However, if I do this, the inspector stops
>> working, and becomes blank. Is this because:
>>
>> 1. My subclassing only javaScriptConsoleMessage detaches the inspector from
>> the web page?
>>
>> 2. My subclassing only javaScriptConsoleMessage removes
>> QtWebKit.QWebSettings.DeveloperExtrasEnabled?
>>
>> As you can tell from my probably ignorantly phrased questions, I'm a bit out
>> of my comfort zone, as someone with very little OOP knowledge.
>>
>>
>>
>> --
>> View this message in context: http://osgeo-org.1560.x6.nabble.com/JS-error-in-QtWebKit-QWebView-no-error-in-IE11-or-Chrome-Win-tp5246541p5246792.html
>> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list