我对 QML、QtQuick 1.0 和 QtQuick 2.0 感到困惑。他们之间有什么区别?
我使用基于 Qt 5.1.1 的 QtCreator 2.8.1。我想开发一个桌面程序,我应该使用哪种技术?
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.
编辑:请参阅@TheBootro 以获得更好的答案
尽管我的答案被 OP 接受,但我想修改(甚至)删除我的答案。
我的回答是基于 2013 年 Qt 5.2 的个人经验,其中一些在今天不再有效:
回到 Qt 5.2,当您构建 Qt Quick Application 时,一个重要的问题是该应用程序是 QtQuick 1.x 还是 QtQuick 2.x。这不仅影响了可用的组件,而且还改变了应用程序的呈现方式。
回到 2013 年:
如果您必须针对较旧的操作系统(例如 Windows XP)或较旧的硬件(例如 OLPC),通常会选择 QtQuick 1.x 应用程序,因为 QML UI 组件(例如按钮)是由您的操作系统本机组件呈现的。但是,这意味着您的目标是一组最低公分母的 UI 组件,并且您的 UI 体验可能因平台而异。
选择 QtQuick 2.x 应用程序以获得更一致的跨平台外观,但是,它要求您的平台充分实现 OpenGLES,否则您的应用程序可能无法加载。不幸的是,这将您的应用程序限制为仅支持实现 OpenGLES 的最新计算机和设备。
当我写下我的原始答案时,这导致我在某些情况下推荐 QtQuick 1.x 而不是 QtQuick 2.x。
然而,从那时起,Qt 5+ 现在允许您在 Windows 上定位 ANGLE,通过转换对 Direct3D 的调用来为 Windows 桌面带来高性能的 OpenGL 兼容性,Direct3D 具有更好的驱动程序支持。