[SOLVED] how to invoke Qt method in web page
-
QtWebkit is not supported in static Qt.
I have to use MWB.Now, i found some way to implement calling Qt function in web page, but it's not good.
so, i wanna register a Qt object into web page, then i can call "window.external.object" in javascript to call Qt function. to implement something just like addToJavaScriptWindowObject in QWebPage.
[quote author="tucnak" date="1340099970"]Why do you not use MWB? There are good QtWebkit module which allow to create Qt-widget with Webkit browser.[/quote] -
at last, i found a urgly way to solve this problem, via signal beforenavigate().
in web page, call window.navigate() with a special string, something like window.navigate("specialstring: xxxx").
then, signal beforenavigate will be emited. now, we can block the navigation, and process our own work.