Qt Reference Documentation

- Qt 4.8
- ALL VERSIONS

- A
- A
- A
- Print

# QML Examples and Demos

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 Viewer tool. The QML Viewer can be run from the command line:

     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

## Demos

The QML demos integrate a variety of features to demonstrate how QML can be used to produce sophisticated interfaces and applications:

Calculator | Flickr Mobile | Minehunt
Photo Viewer | RSS News Reader | Same Game
Snake | Twitter | Web Browser

The demos can be found in Qt's `demos/declarative` directory.

## Examples

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 Same Game tutorials useful.

The examples can be found in Qt's `examples/declarative` directory.

### Animation

- Color Animation
- Behaviors
- Easing
- Property Animation
- States
- Wiggly Text

### Image Elements

- BorderImage
- Image

### Text

- Fonts
- Text Selection

### Positioners

- Example

### Key Interaction

- Focus

### Touch Interaction

- MouseArea

### UI Components

- Dial control
- Flipable
- Progress bar
- Scroll bar
- Search box
- Slide switch
- Spinner
- Tab widget

### Toys

- Clocks
- Corkboards
- Dynamic Scene
- Tic Tac Toe
- TV Tennis

### Models and Views

- GridView
- ListView
- PathView
- Package
- Parallax
- VisualItemModel
- String ListModel
- Object ListModel
- AbstractItemModel
- WebView

### XML

- XmlHttpRequest

### Internationalization (i18n)

- Example

### Right-to-left User Interfaces

- Layout mirroring
- Layout direction
- Text alignment

### Threading

- Threaded ListModel
- WorkerScript

### Screen Orientation

- Example

### SQL Local Storage

- Example

### C++ Extensions

- Reference examples
- Plugins
- QGraphicsLayouts
- QWidgets
- Image provider
- Network access manager factory

## Labs

- Folder List Model - a C++ model plugin
- Shader Effects