One question I've seen come up several times on #qt and qt-interest is how to
There are two things you really need to know in order to perform this
The core of this is really implemented in two methods in the example, they're
This code is all that you need in order to make all of the public slots of the
public slots: void doSomething( const QString ¶m ); int doSums( int a, int b );
The first slot simply logs a message to the debug output, the second returns
MyApi.doSomething( 'Hello from JS page 2!!!!' ); sum = MyApi.doSums( 2, 3 ); alert( 'C++ says the sum is ' + sum );
And that's all there is to it! You can download the code from http://xmelegance.org/devel/qtwebkitextension.tar.gz.