QML 範例和演示

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

動畫

圖像元素

文本元素

定位器

鍵交互

觸控交互

UI 組件

玩具

模型和視圖

XML

國際化 (i18n)

從右到左的用戶界麵

綫程

屏幕取嚮

SQL 本地存儲

C++ 擴展

Labs