Some WebKit Hybrid Stuff

In the CTO announcement from October, there was talk about the HTML5 support in Qt. During the last Qt Developer Days, we showed some ways of what this means and how it works. But the Developer Days event only occurs once a year (per location, at least), and we wanted to give you something that you could refer to and use day to day.

The main thing we felt were missing was a good "starter kit" for building what we call hybrid applications, or embedding an HTML5 web view inside a native application.

So, for starters, we've now added a complete example of how to use a QWebView inside a C++ application, integrate it with native QObjects, and how to use that in the context of a real application.
In addtiion, there's full documentation of the webkit hybrid development functionality, most of its options and sub-features, and architectural recommendations.

Also, for a more advanced/hacky example, check out the new Graphics Dojo example (Ariya would forgive me for hijacking his old playground repo) that shows how to use QtNetwork to perform custom rendering in C++ and use the result in HTML. This is a rather minimalistic example that shows you how to use HTML <img> tags with a custom src URL, and how to deal with the mechanics of handling that URL and passing back image data that would be meaningful to WebKit. This is something I've used in several occasions when the rendering options in HTML weren't flexible enough and I wasn't to delegate it to C++.

Hope you find this useful,
No'am

Links:

http://doc.qt.nokia.com/4.7-snapshot/webkit-imageanalyzer.html

http://doc.qt.nokia.com/4.7/qtwebkit-bridge.html

http://qt.gitorious.org/qt-labs/graphics-dojo/trees/master/url-rendering


Blog Topics:

Comments