[PyQt] Link between a QWebViev and a JavaScript program

projetmbc projetmbc at club-internet.fr
Mon Apr 20 09:24:58 BST 2009

David Boddie a écrit :
> The porting of the C++ Qt examples to Python has fallen behind since Qt 4.3
> so there aren't any simple WebKit examples included with PyQt.
I'm not lucky... :-\

David Boddie a écrit :
> The recent Monster Evolution experiments on Qt Labs include a Python version
> of a program that integrates with WebKit's JavaScript engine:
> http://labs.trolltech.com/blogs/2009/04/07/monster-evolution-in-qt-episode-2-attack-of-the-squirrelfish/
> QWebFrame's addToJavaScriptWindowObject() method lets you insert an instance
> of a QObject subclass into the page. You can expose methods to JavaScript,
> but you have to declare them as slots with the @pyqtSignature() decorator.
> The example code can be found here:
> http://labs.trolltech.com/gitweb?p=GraphicsDojo;a=blob;f=webmonster/webmonster.py
I'll study it as soon as possible...


More information about the PyQt mailing list