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
目錄。