Qt Examples And Tutorials

A collection of code samples and tutorials are provided with Qt to help new users get started with Qt development. These documents cover a range of topics, from basic use of widgets to step-by-step tutorials that show how an application is put together.

The examples are part of the Qt packages. Visit the Downloads page for more information.

Running the Examples

Open and run examples in Qt Creator Welcome mode. Most of the examples run on various platforms and to search for platform-specific examples, type the platform name (or any keywords) in the search field. For example, typing Android in the search field lists the examples that are fully compatible with Android.

For more information about running examples in Qt Creator, see Qt Creator: Tutorial: Build and run.

Application Examples

Calqlatr

A Qt Quick app designed for landscape and portrait devices that uses custom components, responsive layouts, and JavaScript for the application logic.

Car Configurator

A car model example that demonstrates using Qt Quick 3D cameras, extended scene environment and Qt Quick 3D.

Coffee Machine

A Qt Quick application with a state-based custom user interface.

Dice

A dice throwing application using Qt Quick 3D Physics and other Qt Modules.

Document Viewer

A Widgets application to display and print JSON, text, and PDF files.

FX & Material Showroom

Demonstrates material and effects capabilities of Qt Quick 3D. This example demonstrates how you can use particle effects and materials in Qt Quick 3D.

Getting Started Programming with Qt Quick

A tutorial for Qt Quick based on an alarms application.

Lightning Viewer

An application with a responsive UI showing lightning strikes on a map in real-time by combining Qt Quick, Qt Location, Qt Positioning and Qt Websockets.

Media Player

Playing audio and video using Qt Quick.

Photo Surface

A QML app for touch devices that uses a Repeater with a FolderListModel to access content in a folder, and a PinchHandler to handle pinch gestures on the fetched content.

Qt Quick Demo - RESTful API client

Example of how to create a RESTful API QML client.

Robot Arm

Demonstrates how to add a C++ backend to a 3D project from Qt Design Studio. This example demonstrates adding a C++ backend to a 3D project created in Qt Design Studio. The example itself consists of an interactive industrial robot arm in a Qt Quick 3D scene. The 2D UI to control the robot arm is implement using Qt Quick Controls.

Same Game

A QML implementation of the popular puzzle game by Kuniaki Moribe.

Thermostat

A user interface for a home thermostat, implemented in Qt Quick. It demonstrates how to create responsive applications that scale from large desktop displays to mobile and small embedded displays.

To Do List

A QML implementation of to do list application that demonstrates how to create application thats looks native on any platform.

Window Embedding

A demonstration of how to embed non-Qt UI elements into Qt applications.

Desktop

Media Player

Playing audio and video using Qt Quick.

Mobile

Calqlatr

A Qt Quick app designed for landscape and portrait devices that uses custom components, responsive layouts, and JavaScript for the application logic.

Coffee Machine

A Qt Quick application with a state-based custom user interface.

Dice

A dice throwing application using Qt Quick 3D Physics and other Qt Modules.

Lightning Viewer

An application with a responsive UI showing lightning strikes on a map in real-time by combining Qt Quick, Qt Location, Qt Positioning and Qt Websockets.

Media Player

Playing audio and video using Qt Quick.

Embedded

Coffee Machine

A Qt Quick application with a state-based custom user interface.

Thermostat

A user interface for a home thermostat, implemented in Qt Quick. It demonstrates how to create responsive applications that scale from large desktop displays to mobile and small embedded displays.

Graphics

Qt Quick Demo - Clocks

A QML clock application that demonstrates using a ListView type to display data generated by a ListModel and a SpringAnimation type to animate images.

Qt Widgets - Text Viewer Plugin Example

A widget example with menus, toolbars and a status bar.

Multimedia

3D

FX & Material Showroom

Demonstrates material and effects capabilities of Qt Quick 3D. This example demonstrates how you can use particle effects and materials in Qt Quick 3D.

OSM Buildings

A 3D building viewer of OSM (OpenStreetMap) buildings map data.

Qt Quick 3D - XR Physics-base teleportation demo

Demonstrates how to make physics-affected locomotion in Qt Quick 3D XR.

Data Visualization

StocQt

A configurable stock chart for 100 stocks.

Data Processing & I/O

Connectivity

Networking

Lightning Viewer

An application with a responsive UI showing lightning strikes on a map in real-time by combining Qt Quick, Qt Location, Qt Positioning and Qt Websockets.

Qt Quick Demo - RESTful API client

Example of how to create a RESTful API QML client.

Positioning & Location

Lightning Viewer

An application with a responsive UI showing lightning strikes on a map in real-time by combining Qt Quick, Qt Location, Qt Positioning and Qt Websockets.

User Interface Components

Web Technologies

Qt Quick Demo - RSS News

A QML RSS news reader that uses XmlListModel and XmlListModelRole custom QML types to download XML data, ListModel and ListElement to create a category list, and ListView to display the data.

Community Examples

To view and run examples provided through the Qt Project, visit the Community Examples page.

All Examples

All Qt Examples lists all examples categorized by the Qt module they belong to.