1 /****************************************************************************
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Contact: http://www.qt.io/licensing/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see http://www.qt.io/terms-conditions. For further
15 ** information use the contact form at http://www.qt.io/contact-us.
17 ** GNU Free Documentation License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Free
19 ** Documentation License version 1.3 as published by the Free Software
20 ** Foundation and appearing in the file included in the packaging of
21 ** this file. Please review the following information to ensure
22 ** the GNU Free Documentation License version 1.3 requirements
23 ** will be met: http://www.gnu.org/copyleft/fdl.html.
26 ****************************************************************************/
29 \page qdeclarativeexamples.html
30 \title QML Examples and Demos
31 \brief Building UIs with QML
35 Qt includes a set of examples and demos that show how to use various aspects
36 of QML. The examples are small demonstrations of particular QML components,
37 while the demos contain more complete and functional applications.
39 To run the examples and demos, open them in Qt Creator or use the included
40 \l {QML Viewer} tool. The \l {QML Viewer} can be run from the command line:
43 qmlviewer $QTDIR/demos/declarative/samegame/samegame.qml
46 On Mac OS X, you can run the included "QMLViewer" application from the
47 Finder, or use the command line:
50 QMLViewer.app/Contents/MacOS/QMLViewer $QTDIR/demos/declarative/samegame/samegame.qml
56 The QML demos integrate a variety of features to demonstrate how QML
57 can be used to produce sophisticated interfaces and applications:
64 \l{demos/declarative/calculator}{Calculator}
65 \image qml-calculator-example-small.png
68 \l{demos/declarative/flickr}{Flickr Mobile}
69 \image qml-flickr-demo-small.png
72 \l{demos/declarative/minehunt}{Minehunt}
73 \image qml-minehunt-demo-small.png
78 \l{demos/declarative/photoviewer}{Photo Viewer}
79 \image qml-photoviewer-demo-small.png
82 \l{demos/declarative/rssnews}{RSS News Reader}
83 \image qml-rssnews-demo-small.png
86 \l{demos/declarative/samegame}{Same Game}
87 \image qml-samegame-demo-small.png
92 \l{demos/declarative/snake}{Snake}
93 \image qml-snake-demo-small.png
96 \l{demos/declarative/twitter}{Twitter}
97 \image qml-twitter-demo-small.png
100 \l{demos/declarative/webbrowser}{Web Browser}
101 \image qml-webbrowser-demo-small.png
105 The demos can be found in Qt's \c demos/declarative directory.
110 The QML examples are small, simple applications that show how to use a particular
111 QML component or feature. If you are new
112 to QML, you may also find the \l{QML Tutorial}{Hello World} and
113 \l {QML Advanced Tutorial}{Same Game} tutorials useful.
115 The examples can be found in Qt's \c examples/declarative directory.
119 \o \l{declarative/animation/basics/color-animation}{Color Animation}
120 \o \l{declarative/animation/behaviors/behavior-example}{Behaviors}
121 \o \l{declarative/animation/easing}{Easing}
122 \o \l{declarative/animation/basics/property-animation}{Property Animation}
123 \o \l{declarative/animation/states}{States}
124 \o \l{declarative/animation/behaviors/wigglytext}{Wiggly Text}
127 \section2 Image Elements
129 \o \l{declarative/imageelements/borderimage}{BorderImage}
130 \o \l{declarative/imageelements/image}{Image}
135 \o \l{declarative/text/fonts}{Fonts}
136 \o \l{declarative/text/textselection}{Text Selection}
139 \section2 Positioners
141 \o \l{declarative/positioners}{Example}
144 \section2 Key Interaction
146 \o \l{declarative/keyinteraction/focus}{Focus}
149 \section2 Touch Interaction
151 \o \l{declarative/touchinteraction/mousearea}{MouseArea}
154 \section2 UI Components
156 \o \l{declarative/ui-components/dialcontrol}{Dial control}
157 \o \l{declarative/ui-components/flipable}{Flipable}
158 \o \l{declarative/ui-components/progressbar}{Progress bar}
159 \o \l{declarative/ui-components/scrollbar}{Scroll bar}
160 \o \l{declarative/ui-components/searchbox}{Search box}
161 \o \l{declarative/ui-components/slideswitch}{Slide switch}
162 \o \l{declarative/ui-components/spinner}{Spinner}
163 \o \l{declarative/ui-components/tabwidget}{Tab widget}
168 \o \l{declarative/toys/clocks}{Clocks}
169 \o \l{declarative/toys/corkboards}{Corkboards}
170 \o \l{declarative/toys/dynamicscene}{Dynamic Scene}
171 \o \l{declarative/toys/tic-tac-toe}{Tic Tac Toe}
172 \o \l{declarative/toys/tvtennis}{TV Tennis}
175 \section2 Models and Views
177 \o \l{declarative/modelviews/gridview}{GridView}
178 \o \l{Models and Views: ListView Examples}{ListView}
179 \o \l{declarative/modelviews/pathview}{PathView}
180 \o \l{declarative/modelviews/package}{Package}
181 \o \l{declarative/modelviews/parallax}{Parallax}
182 \o \l{declarative/modelviews/visualitemmodel}{VisualItemModel}
184 \o \l{declarative/modelviews/stringlistmodel}{String ListModel}
185 \o \l{declarative/modelviews/objectlistmodel}{Object ListModel}
186 \o \l{declarative/modelviews/abstractitemmodel}{AbstractItemModel}
188 \o \l{Models and Views: WebView Examples}{WebView}
193 \o \l{declarative/xml/xmlhttprequest}{XmlHttpRequest}
196 \section2 Internationalization (i18n)
198 \o \l{declarative/i18n}{Example}
201 \section2 Right-to-left User Interfaces
203 \o \l{declarative/righttoleft/layoutmirroring}{Layout mirroring}
204 \o \l{declarative/righttoleft/layoutdirection}{Layout direction}
205 \o \l{declarative/righttoleft/textalignment}{Text alignment}
210 \o \l{declarative/threading/threadedlistmodel}{Threaded ListModel}
211 \o \l{declarative/threading/workerscript}{WorkerScript}
214 \section2 Screen Orientation
216 \o \l{declarative/screenorientation}{Example}
219 \section2 SQL Local Storage
221 \o \l{declarative/sqllocalstorage}{Example}
224 \section2 C++ Extensions
226 \o \l{declarative-cppextensions-reference.html}{Reference examples}
227 \o \l{declarative/cppextensions/plugins}{Plugins}
228 \o \l{declarative-cppextensions-qgraphicslayouts.html}{QGraphicsLayouts}
229 \o \l{declarative/cppextensions/qwidgets}{QWidgets}
230 \o \l{declarative/cppextensions/imageprovider}{Image provider}
231 \o \l{declarative/cppextensions/networkaccessmanagerfactory}{Network access manager factory}
238 \o \l{src/imports/folderlistmodel}{Folder List Model} - a C++ model plugin
239 \o \l{declarative/shadereffects}{Shader Effects}