I have been researching about these two technologies for creating a good looking desktop using Qt. However I see people talking about Qml as the next big thing for desktop apps since it provides all those "good" eye candy effects for a desktop application. But on the other hand with QtWebkit we could bring the same state-of-the-art UI looks and feel that we have on the web. Now I need help in choosing the right technology for a cross-platform application with a descent good looking UI. So Qml or QtWebkit with html5?

有帮助吗?

解决方案

You will eventually hit webkit's limitations. First of all, webkit is really heavyweight. Just its javascript engine is about 5MB IIRC. Qt 5.2 dropped the V8 javascript engine for its own engine, and saved about that much from the executable size.

QML gives you all the benefits of javascript with a couple things that are simply nowhere in webkit, namely:

  1. A declarative, property-binding style of hooking things together, with a lot of well-performing elements, such as animations. In html you have to deal with dom and css separately, and there is an obvious impedance mismatch between the two - the designs got nothing to do with each other.

  2. An ever-improving OpenGL-ES-based scene graph. WebGL gives you a much lower-level interface than that, and DOM is something else entirely.

  3. A lighter V4 engine (in 5.2) optimized for QML.

Never mind that webkit simply doesn't use hardware acceleration for its rendering, at all. In QML, graphics hardware nominally does all the rendering. With webkit as-is (as opposed to, say Awesomium), you're leaving yourself behind, performance-wise. It may let you do "flashy" stuff, but it will not be anywhere near as fluid as QML is.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top