Difference between qt qml and qt quick

骑天大圣 picture 骑天大圣 · Oct 31, 2013 · Viewed 30.7k times · Source

I'm confused with QML, QtQuick 1.0 and QtQuick 2.0. What's the difference between them?

I use QtCreator 2.8.1 based on Qt 5.1.1. I want to develop a desktop program, which technology should I use?

Answer

TheBootroo picture TheBootroo · Nov 7, 2013

QML is the name of the language (just like C++, which is another language...)

QtQuick is a toolkit for QML, allowing to develop graphical interface in QML language (there are other toolkits for QML, some are graphical like Sailfish Silica or BlackBerry Cascade, and some are non-graphical like QBS which is a replacement for QMake/CMake/make...)

QtQuick 1.x was Qt4.x-based and used the QPainter/QGraphicsView API to draw the scene. QtQuick 2.X was introduced with Qt5.0, based on Scene Graph, an OpenGLES2 abstraction layer, highly optimized.

With Qt5.1, Scene Graph was enhanced to use multithreading (QtQuick 2.1) With Qt5.2, Scene Graph is yet a lot more optimized to reduce CPU/GPU calls and memory usage

QML engine was based on JsCore (JS engine of Webkit) in Qt4.x and was rebased on V8 (JS engine of Google Chrome) with 5.0 but this disallows to use it on mobiles and especially on iOS, so Qt5.2 introduced a new QML engine, named V4VM, created by/for Qt guys.

There are also the QtQuick Controls, which is basically a set of native-looking widgets, based on QtQuick. It was originally meant for desktop, but Qt 5.4 introduced a native L&F for Android, based on the holo theme. A material theme, as well as an iOS theme, are in development but not available as of current Qt release (5.5). Some controls were Enterprise only, but in Qt5.5 they got renamed as Extras, and they are now available for all licenses. Another development is undergoing, named QtQuickControls 2, which is a full rewrite of Controls, to gain better performance, aimed for light embedded UIs, it should at Tech Preview stage in Qt 5.6.

From Qt5.5, there is a new module named QtQuick3D, which gives ability to create 3D apps/games using QML language. It doesn't use SceneGraph which is too 2D/2.4D oriented. A new engine is named FrameGraph for this use.

If you develop modern apps you should use Qt5.x + QML 2.x + QtQuick 2.x, to touch the most vast userbase possible.

With Qt, in general, always follow the updates because they add more features, more perfomances and more platforms.