Qt includes a set of examples and demos that show how to use various aspects of QML. The examples are small demonstrations of particular QML components, while the demos contain more complete and functional applications.
To run the examples and demos, open them in Qt Creator or use the included QML 查看器 工具。 QML 查看器 可以从命令行运行:
qmlviewer $QTDIR/demos/declarative/samegame/samegame.qml
On Mac OS X, you can run the included "QMLViewer" application from the Finder, or use the command line:
QMLViewer.app/Contents/MacOS/QMLViewer $QTDIR/demos/declarative/samegame/samegame.qml
The QML demos integrate a variety of features to demonstrate how QML can be used to produce sophisticated interfaces and applications:
计算器
|
Flickr 移动版
|
扫雷
|
照片查看器
|
RSS 新闻阅读器
|
相同游戏
|
蛇
|
Twitter
|
Web 浏览器
|
可以找到演示在 Qt 的
demos/declarative
目录。
The QML examples are small, simple applications that show how to use a particular QML component or feature. If you are new to QML, you may also find the Hello World and 相同游戏 tutorials useful.
可以找到范例在 Qt 的
examples/declarative
目录。