\titleAll Qt Examples

demos/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.

demos/calqlatr

A Qt Quick app designed for portrait devices that uses custom components, animated with AnimationController, and JavaScript for the application logic. category Application Examples category Mobile

demos/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.

demos/coffee

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

demos/colorpaletteclient

Example of how to create a RESTful API QML client.

demos/dice

A dice throwing application that demonstrates using Qt Quick 3D Physics and Qt Quick 3D. category Application Examples

demos/documentviewer

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

demos/documentviewer/plugins/txtviewer

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

demos/hangman

A complete mobile application that demonstrates purchasing in-app products. qtpurchasing-examples android-examples io-examples

demos/mediaplayer

Playing audio and video using Qt Quick.

demos/photosurface

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.

demos/robotarm

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. category Application Examples

demos/rssnews

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.

demos/stocqt

A configurable stock chart for the NASDAQ-100.

demos/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.

demos/todolist

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

tutorials/alarms

A tutorial for Qt Quick based on an alarms application.

Active Qt

activeqt/comapp

COM App example shows how to use ActiveQt to develop a Qt application that can be automated via COM. Different QObject based classes are exposed as COM objects that communicate with the GUI of the running Qt application. The APIs of those COM objects has been designed to resemble the APIs of standard COM applications; i.e. those from Microsoft Office

activeqt/qutlook

Qutlook example demonstrates the use of ActiveQt to automate Outlook. The example makes use of the dumpcpp tool to generate a C++ namespace for the type library describing the Outlook Object Model

activeqt/simple

Simple example demonstrates the use of QAxBindable and QAxFactory

activeqt/wrapper

Wrapper example demonstrates how to export existing QWidget classes as ActiveX controls, and the use of QAxFactory together with the QAXFACTORY_EXPORT() macro. ActiveX controls in this example are the standard button classes QPushButton, QCheckBox and QRadioButton as provided by Qt

Qt 3D

basicshapes-cpp

Shows four basic shapes that Qt 3D offers and sets up a mesh for each of them

multiviewport

A QML example that demonstrates rendering a Scenegraph from multiple viewports

pbr-materials

A QML application that demonstrates using PBR materials

simple-cpp

A C++ application that demonstrates how to render a scene in Qt 3D

simple-qml

A QML application that demonstrates how to render a scene in Qt 3D

simplecustommaterial

Demonstrates creating a custom material in Qt 3D

wireframe

A Qt 3D QML application that implements a single-pass wireframe rendering method

Qt Assistant Manual

remotecontrol

Using and controlling Qt Assistant as a help viewer

simpletextviewer

Using Qt Assistant as a customized help viewer for your application

Qt Bluetooth

btchat

Shows communication through Bluetooth using RFCOMM protocol

heartrate-game

A game demonstrating the interaction with a Bluetooth Low Energy Heart Rate device/service

heartrate-server

An example demonstrating how to set up and advertise a GATT service. The example demonstrates the use of the Qt Bluetooth Low Energy classes related to peripheral (slave) functionality

lowenergyscanner

An application designed to browse the content of Bluetooth Low Energy peripheral devices. The example demonstrates the use of all Qt Bluetooth Low Energy classes

Qt Charts

audio

This example shows the drawing of microphone samples vs audio level

chartsgallery

An application that demonstrates the Qt Charts Widgets API

openglseries

Example shows how to enable OpenGL acceleration for QLineSeries and QScatterSeries

qmlchartsgallery

Demonstrates how to use the different chart types by using qml

qmloscilloscope

Example shows how to implement application with strict performance requirements using the Qt Charts QML API

qmlweather

This is a basic demonstration showing how to use the different chart types by using qml

zoomlinechart

Example shows how to create your own custom zooming effect

Qt CoAP

quickmulticastclient

Using the CoAP client for a multicast resource discovery with a Qt Quick user interface

quicksecureclient

Securing the CoAP client and using it with a Qt Quick user interface

simplecoapclient

Creating an application that communicates with a CoAP server

Qt Concurrent

imagescaling

Demonstrates how to asynchronously download and scale images

primecounter

Demonstrates how to monitor the progress of concurrent operations

wordcount

Demonstrates how to use the map-reduce algorithm

Qt Core

bindableproperties

Demonstrates how the usage of bindable properties can simplify your C++ code

ipc/localfortuneclient

Demonstrates using QLocalSocket for a simple local service client

ipc/localfortuneserver

Demonstrates using QLocalServer and QLocalSocket for serving a simple local service

ipc/sharedmemory

Demonstrates doing inter-process communication using shared memory with the QSharedMemory class

mimetypes/mimetypebrowser

Shows the hierarchy of MIME types and can be used to determine the MIME type of a file

platform/androidnotifier

Demonstrates calling Java code from Qt in an Android application. androidplatform

serialization/cbordump

A demonstration of how to parse files in CBOR format

serialization/convert

Convert example demonstrates how to convert between different serialization formats

serialization/savegame

JSON Save Game example demonstrates how to save and load a small game using QJsonDocument, QJsonObject and QJsonArray

serialization/streambookmarks

Demonstrates how to read and write XBEL files. xml-examples

threads/mandelbrot

Mandelbrot example demonstrates multi-thread programming using Qt. It shows how to use a worker thread to perform heavy computations without blocking the main thread's event loop

threads/queuedcustomtype

Demonstrates multi-thread programming using Qt. qtconcurrent-mtexamples

threads/semaphores

Demonstrates multi-thread programming using Qt. qtconcurrent-mtexamples

threads/waitconditions

Demonstrates multi-thread programming using Qt. qtconcurrent-mtexamples

tools/contiguouscache

Contiguous Cache example shows how to use QContiguousCache to manage memory usage for very large models. In some environments memory is limited and, even when it isn't, users still dislike an application using excessive memory. Using QContiguousCache to manage a list, rather than loading the entire list into memory, allows the application to limit the amount of memory it uses, regardless of the size of the data set it accesses

tools/customtype

Custom Type example shows how to integrate a custom type into Qt's meta-object system

Qt D-Bus

chat

Demonstrates communication among instances of an application

complexpingpong

Demonstrates usage of the Qt D-Bus typesystem

pingpong

Demonstrates a simple message system using D-Bus

remotecontrolledcar

Shows how to use Qt D-Bus to control a car from another application

Qt Data Visualization

graphgallery

Gallery of Bar, Scatter, and Surface graphs

qmlaxishandling

Implementing axis dragging with a custom input handler in QML, and creating a custom axis formatter. QtDataVisualization 6.5

qmlbars

Using Bars3D in a QML application

qmlscatter

Using Scatter3D in a QML application

qmlsurfacegallery

Gallery with three different ways to use a Surface3D graph

volumetric

Rendering volumetric objects. QtDataVisualization 1.2

Qt Designer Manual

calculatorbuilder

Creating a user interface from a Qt Designer form at run-time

calculatorform

Using a form created with Qt Designer in an application

containerextension

Creating a custom multi-page plugin for Qt Designer

customwidgetplugin

Creating a custom widget plugin for Qt Designer

multipleinheritance

Using a form created with Qt Designer in an application

taskmenuextension

Creating a custom widget plugin for Qt Designer and providing custom task menu entries that are associated with the plugin

Qt GRPC

chat

Using the Qt GRPC client API in the user applications

magic8ball

Creating a HTTP2 connection between a Qt GRPC client and a C++ gRPC server

Qt GUI

hellovulkancubes

Shows the basics of using QVulkanWindow. category Graphics & Multimedia

hellovulkantriangle

Shows the basics of rendering with QVulkanWindow and the Vulkan API. category Graphics & Multimedia

hellovulkanwidget

Shows the usage of QVulkanWindow in QWidget applications. category Graphics & Multimedia

rasterwindow

This example shows how to create a minimal QWindow based application using QPainter for rendering

rhiwindow

This example shows how to create a minimal QWindow-based application using QRhi

Qt Graphs

axishandling

Implementing axis dragging with a custom input handler in QML, and creating a custom axis formatter

bars

Using Bars3D in a QML application

scatter

Using Scatter3D in a QML application

surfacegallery

Gallery with three different ways to use a Surface3D graph

widgetgraphgallery

Gallery of Bar, Scatter, and Surface graphs

widgetvolumetric

Rendering volumetric objects

Qt HTTP Server

colorpalette

Example of how to create a RESTful API server using the QHttpServer

simple

Simple example of how to set up an HTTP server

Qt Help

contextsensitivehelp

Using the QHelpEngineCore class to implement context-sensitive help for applications

Qt Linguist Manual

arrowpad

Understanding the Qt Linguist contexts concept and using two or more languages

hellotr

Translating a small Hello World program to Latin

i18n

Demonstrates Qt's support for translated text

trollprint

Updating translations for later releases

Qt Location

geojson_viewer

GeoJson viewer example demonstrates how to manipulate MapItems, handle user input and I/O to and from a GeoJson file

itemview_transitions

How to use transitions together with MapItemView

mapviewer

Map Viewer example shows how to display and interact with a map, search for an address, and find driving directions

minimal_map

Minimum code to display a map using Qt Quick

places

Places example demonstrates how to search for Places and access related content

places_list

Places List example demonstrates how to search for and display a list of places using a ListView

places_map

Places Map example demonstrates how to search for and display a list of places on a map using a MapItemView

planespotter

Plane Spotter example demonstrates the tight integration of location and positioning data types into QML

Qt MQTT

quicksubscription

Registering QMqttClient to QML and using it in a Qt Quick user interface

simpleclient

Creating a minimalistic telemetry application

subscriptions

Creating a application that communicates with an MQTT broker

websocketsubscription

Combining an MQTT client with a web socket connection

Qt Multimedia

audiodevices

Testing the available audio devices and their configuration

audiooutput

Enabling audio playback using the QAudioSink class

audiorecorder

Discovering the available devices and supported codecs

audiosource

Recording audio using the QAudioSource class

camera

Shows how to capture a still image or record video. or video

declarative-camera

This Qt Quick based application shows how to use the API to capture a still image or video

player

Playing audio and video

screencapture

Capturing a screen or window

spectrum

Analyzing a raw audio stream using the FFTReal library

video/mediaplayer

Playing audio and video using Qt Quick

video/qmlvideo

Transforming video and camera viewfinder content

video/recorder

Recording audio and video using Qt Quick

videographicsitem

Streaming video on a graphics scene

videowidget

Implementing a video player widget

Qt NFC

annotatedurl

Example shows reading from formatted NFC Data Exchange Format (NDEF) messages

ndefeditor

An example of reading and writing NFC Data Exchange Format (NDEF) messages to NFC Forum Tags

Qt Network

blockingfortuneclient

Demonstrates how to create a client for a network service

broadcastreceiver

Demonstrates how to receive information broadcasted over a local network

broadcastsender

Demonstrates how to broadcast information to multiple clients on a local network

fortuneclient

Demonstrates how to create a client for a network service

fortuneserver

Demonstrates how to create a server for a network service

http

Demonstrates a simple HTTP client

multicastreceiver

Demonstrates how to receive information sent to a multicast group

multicastsender

Demonstrates how to send messages to a multicast group

network-chat

Demonstrates a stateful peer-to-peer Chat client

securesocketclient

Demonstrates how to communicate over an encrypted (SSL) connection

secureudpclient

This example demonstrates how to implement client-side DTLS connections

secureudpserver

This examples demonstrates how to implement a simple DTLS server

serialization/rsslisting

A demonstration of how to fetch and display a network resource

threadedfortuneserver

Threaded Fortune Server example shows how to create a server for a simple network service that uses threads to handle requests from different clients. It is intended to be run alongside the Fortune Client example

torrent

Demonstrates complex TCP/IP operations

Qt Network Authorization

redditclient

Demonstrates authenticating with OAuth 2 to access Reddit

Qt OPC UA

opcuaviewer

Using the model/view approach to display all nodes of an OPC UA server in a tree view

waterpump/waterpump-qml

Interacting with an OPC UA server to build a QML-based HMI for a simple machine

waterpump/waterpump-qmlcpp

Interacting with an OPC UA server to build a QML-based HMI for a simple machine

x509

Shows how to generate keys and certificate signing requests

Qt OpenGL

2dpainting

2D Painting example shows how QPainter and QOpenGLWidget can be used together to display accelerated 2D graphics on supported hardware

cube

Shows how to manually rotate a textured 3D cube with user input

hellogl2

Hello GL2 example demonstrates the basic use of the OpenGL-related classes provided with Qt

hellogles3

Demonstrates OpenGL ES 3.0 functions via QOpenGLExtraFunctions

openglwindow

This example shows how to create a minimal QWindow based application for the purpose of using OpenGL

stereoqopenglwidget

This example shows how to create a minimal QOpenGLWidget based application with stereoscopic rendering support

textures

Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics

Qt Positioning

logfilepositionsource

Logfile Position Source shows how to create and work with a custom position source. It can be useful for simulating GPS data, or when the data is received in some custom format

satelliteinfo

SatelliteInfo example shows the available satellites using Sky View, Table View, or RSSI View and the user's current position

weatherinfo

Weather Info example shows how to use the user's current position to retrieve local content from a web service in a C++ plugin for QML

Qt Protobuf

sensors

Sensors example shows how two applications can communicate by sending protobuf messages using UDP sockets

Qt QML

dynamicscene

This example demonstrates creating components dynamically

qml-i18n

Generating translation files (TS and QM) for a Qt Quick application

Qt Quick

animation

This is a collection of QML Animation examples

canvas

This is a collection of QML Canvas examples

customitems/dialcontrol

Dial Control Example shows how to create a speedometer-type dial. category Graphics & Multimedia

customitems/flipable

Flipable Example shows an item that flips whenever clicked, rotating around the y-axis. category Graphics & Multimedia

customitems/painteditem

Shows how to implement QPainter-based custom scenegraph items. qtquickexamples category Graphics & Multimedia

draganddrop

This is a collection of QML drag and drop examples

embeddedinwidgets

Demonstrates embedding a QQuickWindow into a QWidget UI via QWidget::createWindowContainer(). qtquickexamples category Graphics & Multimedia

imageelements

This is a collection of QML examples relating to image types

imageprovider

How to load images in QML with QQuickImageProvider. category Graphics & Multimedia

imageresponseprovider

How to load images asynchronously in QML. category Graphics & Multimedia

itemvariablerefreshrate

A Qt Quick example shows how to setup variable refresh rate for specific parts of the UI. qtquickexamples category Graphics & Multimedia

keyinteraction

This is a collection of QML keyboard interaction examples

layouts

Demonstrates how to use layout types to arrange a UI

localstorage

A collection of QML local storage examples

models/abstractitemmodel

Shows how to use a QAbstractItemModel subclass as a model in QML. category User Interface Components

models/objectlistmodel

Shows how to use a QList as a model in QML. category User Interface Components

models/stringlistmodel

Shows how to use a QStringList as a model in QML. category User Interface Components

mousearea

This is an example of the MouseArea type in QML

multieffect/itemswitcher

Demonstrates MultiEffect usage. qtquickexamples category Graphics & Multimedia

multieffect/testbed

Demonstrates MultiEffect usage. qtquickexamples category Graphics & Multimedia

particles/affectors

This is a collection of examples using Affectors in the QML particle system

particles/emitters

This is a collection of examples using Emitters in the QML particle system

particles/imageparticle

This is a collection of examples using Affectors in the QML particle system

particles/system

This is a collection of examples using Affectors in the QML particle system

pointerhandlers

Shows how to use Qt Quick Input Handlers in interactive components

positioners

This is a collection of QML Positioner examples

quick-accessibility

This example demonstrates the implementation of accessible buttons. qtquickexamples category Graphics & Multimedia

quickwidgets/qquickwidgetversuswindow_opengl

Demonstrates the benefits of QQuickWidget over a QQuickView embedded as a native window. category User Interface Components

quickwidgets/quickwidget

Demonstrates how to mix QML with a Qt Widgets application using the QQuickWidget class. category User Interface Components

rendercontrol/rendercontrol_d3d11

Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based Direct3D 11 renderer. category Graphics & Multimedia

rendercontrol/rendercontrol_opengl

Shows how to render a Qt Quick scene into a texture that is then used by a non-Quick based OpenGL renderer. category Graphics & Multimedia

responsivelayouts

Demonstrates how to use LayoutItemProxy to make a responsive UI. qtquickexamples category User Interface Components

scenegraph/customgeometry

Shows how to implement a custom geometry in the Qt Quick Scene Graph

scenegraph/custommaterial

Shows how to implement a custom material in the Qt Quick Scene Graph

scenegraph/customrendernode

Shows how to use QSGRenderNode to implement custom rendering in the Qt Quick scenegraph

scenegraph/d3d11underqml

Shows how to render directly with Direct3D 11 under a Qt Quick scene

scenegraph/graph

Demonstrates how one can combine custom materials and geometries under a single QQuickItem

scenegraph/metaltextureimport

Shows how to use a texture created directly with Metal

scenegraph/metalunderqml

Shows how to render directly with Metal under a Qt Quick scene

scenegraph/openglunderqml

Shows how to render OpenGL under a Qt Quick scene

scenegraph/rhitextureitem

Shows how to implement a custom QQuickItem that displays a QRhi-rendered texture

scenegraph/rhiunderqml

Shows how to render directly with QRhi under a Qt Quick scene

scenegraph/twotextureproviders

Shows how to combine two textures from two texture providers in a custom scene graph node

scenegraph/vulkantextureimport

Shows how to use a texture created directly with Vulkan

scenegraph/vulkanunderqml

Shows how to render directly with Vulkan under a Qt Quick scene

shadereffects

A Qt Quick example demonstrating the use of shader effects. qtquickexamples category Graphics & Multimedia

shapes

A Qt Quick example demonstrating the use of shape items. qtquickexamples category Graphics & Multimedia

tableview/gameoflife

Conway’s Game of Life example shows how the QML TableView type can be used to display a C++ model that the user can pan around. category Graphics & Multimedia

tableview/pixelator

Pixelator example shows how a QML TableView and a delegate can be used for custom table models. category Graphics & Multimedia

text

This is a collection of QML examples relating to text

tutorials/dynamicview/dynamicview1

tutorials/dynamicview/dynamicview2

tutorials/dynamicview/dynamicview3

tutorials/dynamicview/dynamicview4

tutorials/samegame/samegame1

tutorials/samegame/samegame2

tutorials/samegame/samegame3

tutorials/samegame/samegame4

views

This is a collection of QML model-view examples

window

This example demonstrates the Window and Screen types in QML

Qt Quick 3D

antialiasing

Demonstrates the antialiasing modes in Qt Quick 3D

bakedlightmap

Demonstrates the use of baked lightmaps in a 3D scene

customeffect

Demonstrates writing custom post-processing effects

customgeometry

Demonstrates providing custom vertex data from C++ and QML

custominstancing

Demonstrates instancing with custom materials and a C++ instance table

custommaterial

Demonstrates writing shaded custom materials

custommorphing

Demonstrates writing C++ custom geometry with a morph target

customshaders

Demonstrates the use of custom vertex and fragment shaders

dynamiccreation

Demonstrates dynamic model creation

hellocube

Demonstrates how to render 2D and 3D objects together in Qt Quick 3D

helloqtquick3d

Demonstrates simple instanced drawing

instancing

Demonstrates how to do instanced rendering in Qt Quick 3D

intro

Demonstrates how to render a scene in Qt Quick 3D

lights

Demonstrates the use of different light types

lodhelper

Demonstrates the use of level of detail helper

morphing

Demonstrates how to control morphing animations in Qt Quick 3D

particles3d

Demonstrates how to use the Qt Quick 3D Particles3D module

picking

Demonstrates picking of models

principledmaterial

Demonstrates the use of Principled Material

proceduraltexture

Demonstrates how to provide custom texture data from C++ or QML

quickball

Demonstrates how to create a simple game using Quick3D

quickitems

Demonstrates the use of Qt Quick Items in Quick 3D scene

reflectionprobes

Demonstrates the use of reflection probes in Qt Quick 3D

runtimeloader

Demonstrates how assets can be loaded at runtime

sceneeffects

Demonstrates the use of ExtendedSceneEnvironment

screenspacereflections

Demonstrates reflections in Qt Quick 3D

simplefog

Demonstrates how to enable fog in the 3D scene

skinning

Demonstrates how to render a simple skinning animation in Qt Quick 3D

submeshes

Demonstrates how assign materials to sub-meshes

view3d

Demonstrates the use of View3D to show a scene from multiple cameras

Qt Quick 3D Physics

cannon

Demonstrates how to spawn physical objects

charactercontroller

Demonstrates the CharacterController type

compoundshapes

Demonstrates using complex collision shapes

customshapes

Demonstrates using different shapes

impeller

Demonstrates using trigger bodies and collision info

mass

Demonstrates different ways of setting mass and inertia of a body

material

Demonstrates using physical materials

simple

Demonstrates setting up a simple physics scene

Qt Quick Controls

attachedstyleproperties

Demonstrates use of QQuickAttachedPropertyPropagator

contactlist

A QML app using Qt Quick Controls and a C++ class that implements a simple contact list

eventcalendar

A simple event calendar

filesystemexplorer

A QML app utilizing customized Qt Quick Controls to display text files from a filesystem

flatstyle

A QML app using Qt Quick Controls and a QML plugin with customized controls

gallery

A gallery of controls

imagine/automotive

An automotive user interface using custom Imagine style assets

ios/todolist

To do list application for iOS

texteditor

A QML app using Qt Quick Controls and a C++ class to provide a fully-functional rich-text editor application

wearable

Demonstrates an application launcher designed for wearable devices

Qt Quick Effect Maker

wiggly

Demonstrates how to use an effect created with the Qt Quick Effect Maker (QQEM)

Qt Remote Objects

ble

Using QtBluetooth Low Energy (BT LE or BLE for short) as a transport medium with Qt Remote Objects. qtremoteobjects-examples

clientapp

A client who holds a replica of a time object from a server and displays the time in a clock

modelviewclient

Developing a very simple client program which displays the content and changes made on a server. qtremoteobjects-examples

modelviewserver

Developing a simple server program that displays and makes changes to a QTreeView which is made available on a Remote Objects network. qtremoteobjects-examples

remoteobjects_server

A server which shares a time object with connected clients

ssl

Setting up a secure Remote Object network using QSslSockets. category Connectivity qtremoteobjects-examples

websockets

Using a non-QIODevice-based transport (QWebSocket) with QtRemoteObjects. category Connectivity qtremoteobjects-examples

Qt SCXML

calculator

An application that implements the Calculator example presented in the SCXML Specification

ftpclient

Implements a simple FTP client using a state machine

invoke

Invokes a compiled nested state machine

mediaplayer

Sends data to and receives it from a C++ data model

sudoku

Demonstrates the use of separate javascript file with SCXML

trafficlight-qml-dynamic

A Qt Quick application that uses a dynamically loaded state machine to implement a traffic light

trafficlight-qml-simple

A Qt Quick application that uses a compiled state machine to implement a simplified traffic light

trafficlight-qml-static

A Qt Quick application that uses a compiled state machine to implement a traffic light

trafficlight-widgets-dynamic

A widget-based application that uses a dynamically loaded state machine to implement a traffic light

trafficlight-widgets-static

A widget-based application that uses a compiled state machine to implement a traffic light

Qt SQL

books

Shows how to use Qt SQL classes with a model/view framework

cachedtable

Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a push button

drilldown

Drill Down example shows how to read data from a database as well as submit changes, using the QSqlRelationalTableModel and QDataWidgetMapper classes

masterdetail

Master Detail Example shows how to present data from different data sources in the same application. The album titles, and the corresponding artists and release dates, are kept in a database, while each album's tracks are stored in an XML file

querymodel

Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates the query and table views to display the results

relationaltablemodel

Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database

sqlbrowser

SQL Browser example shows how a data browser can be used to visualize the results of SQL statements on a live database

sqlwidgetmapper

SQL Widget Mapper example shows how to use a map information from a database to widgets on a form

tablemodel

Table Model example shows how to use a specialized SQL table model with table views to edit information in a database

Qt Sensors

sensorsshowcase

Sensors Showcase example demonstrates sensor usage with visual examples. qtsensors-examples

Qt Serial Bus

can

Example sends and receives CAN bus frames

modbus/client

Example implements a Modbus client application

modbus/custom

Example shows how to handle custom Modbus function codes

modbus/server

Example implements a Modbus server application

Qt Serial Port

blockingreceiver

Shows how to use the synchronous API of QSerialPort in a non-GUI thread

blockingsender

Shows how to use the synchronous API of QSerialPort in a worker thread

terminal

Shows how to use various features of QSerialPort

Qt Spatial Audio

audiopanning

Shows some of the capabilities of the spatial audio engine in Qt

Qt State Machine

moveblocks

Move Blocks example shows how to animate items in a QGraphicsScene using a QStateMachine with a custom transition

pingpong

Ping Pong States example shows how to use parallel states together with custom events and transitions in Qt State Machine Framework

rogue

Rogue example shows how to use the Qt state machine for event handling

trafficlight

Traffic Light example shows how to use Qt State Machine Overview to implement the control flow of a traffic light

Qt TextToSpeech

hello_speak

Hello Speak example reads out user-provided text

quickspeech

Quick Speech example reads out user-provided text

Qt UI Tools

textfinder

Dynamically loading .ui files using QUiLoader

Qt Virtual Keyboard

basic

This example shows how to use the virtual keyboard in a Qt Quick application. qtvirtualkeyboard-examples

Qt WebChannel

chatclient-html

A HTML/JavaScript client that communicates over a WebSocket with a QWebChannel server

chatclient-qml

A QML client that communicates over a WebSocket with a QWebChannel server. category Web Technologies

chatserver-cpp

A simple chat server implemented using the QWebChannel C++ API

standalone

A simple chat between a server and a remote client running in a browser

Qt WebSockets

echoclient

Show how to write a simple WebSocket client application

echoserver

Show how to write a simple WebSocket server application

qmlwebsocketclient

Explains how to write a QML WebSocket client example

qmlwebsocketserver

A simple example that shows how to use a QML WebSocketServer

simplechat

A minimal chat application using the WebSocket protocol

sslechoclient

A simple client application using secure WebSockets (wss)

sslechoserver

A simple server to respond to clients over secure WebSockets (wss)

Qt WebView

minibrowser

Minibrowser example demonstrates how to use the Qt WebView module with Qt Quick

Qt Widgets

animation/easing

Easing Curves example shows how to use easing curves to control the speed of an animation

desktop/screenshot

Screenshot example shows how to take a screenshot of the desktop

desktop/systray

System Tray Icon example shows how to add an icon with a menu and popup messages to a desktop environment's system tray

dialogs/licensewizard

License Wizard example shows how to implement complex wizards in Qt

dialogs/standarddialogs

Standard Dialogs example shows the standard dialogs that are provided by Qt

dialogs/tabdialog

Tab Dialog example shows how to construct a tab dialog using the QTabWidget class

dialogs/trivialwizard

Trivial Wizard example illustrates how to create a linear three-page registration wizard using three instances of QWizardPage and one instance of QWizard

draganddrop/draggableicons

Draggable Icons example shows how to drag and drop image data between widgets in the same application, and between different applications

draganddrop/draggabletext

Illustrates how to drag and drop text between widgets

draganddrop/dropsite

Example shows how to distinguish the various MIME formats available in a drag and drop operation

effects/blurpicker

Demonstrates how to apply graphical effects on items in the view

gallery

Widgets Gallery example shows widgets relevant for designing UIs

gestures/imagegestures

Demonstrates the use of simple gestures in a widget

graphicsview/basicgraphicslayouts

Demonstrates how to create basic graphics layout

graphicsview/chip

Visualizes a huge graphic view scene with 40000 chip items

graphicsview/collidingmice

Demonstrates how to animate items on a graphics view. examples-graphicsview

graphicsview/diagramscene

Demonstrate how to use the Graphics View framework

graphicsview/dragdroprobot

Demonstrates how to drag and drop items in a graphics view

graphicsview/elasticnodes

Demonstrates how to interact with graphical items in a scene

graphicsview/simpleanchorlayout

Demonstrates anchor layout on a graphics view scene

itemviews/addressbook

Address book example shows how to use proxy models to display different views onto data from a single model

itemviews/basicsortfiltermodel

Basic Sort/Filter Model example illustrates how to use QSortFilterProxyModel to perform basic sorting and filtering

itemviews/coloreditorfactory

This example shows how to create an editor that can be used by a QItemDelegate

itemviews/combowidgetmapper

Combo Widget Mapper example shows how to use a custom delegate to map information from a model to specific widgets on a form

itemviews/customsortfiltermodel

Custom Sort/Filter Model example illustrates how to subclass QSortFilterProxyModel to perform advanced sorting and filtering

itemviews/editabletreemodel

This example shows how to implement a simple item-based tree model that can be used with other classes in the model/view framework

itemviews/fetchmore

Fetch More example shows how to add items to an item view model on demand

itemviews/frozencolumn

This example demonstrates how to freeze a column within a QTableView

itemviews/simpletreemodel

Simple Tree Model example shows how to use a hierarchical model with Qt's standard view classes

itemviews/spinboxdelegate

Spin Box Delegate example shows how to create an editor for a custom delegate in the model/view framework by reusing a standard Qt editor widget

itemviews/spreadsheet

Spreadsheet example shows how to create a simple spreadsheet application

itemviews/stardelegate

Star Delegate example shows how to create a delegate that can paint itself and that supports editing

layouts/basiclayouts

Shows how to use the standard layout managers

layouts/flowlayout

Shows how to arrange widgets for different window sizes

mainwindows/menus

Menus example demonstrates how menus can be used in a main window application

painting/affine

Demonstrates how affine transformations in QPainter work

painting/basicdrawing

Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the QPainter class

painting/composition

Demonstrates how Composition Modes work in QPainter

painting/concentriccircles

Demonstrates the improved quality that antialiasing and floating point precision gives

painting/deform

Demonstrates how to manipulate the elements of a QPainterPath

painting/gradients

Shows how gradients can be used with QPainter

painting/imagecomposition

Shows how composition modes work in QPainter

painting/painterpaths

Painter Paths example shows how painter paths can be used to beuild complex shapes for rendering

painting/pathstroke

Path Stroking example shows various types of pens that can be used with QPainter

painting/transformations

Transformations example shows how transformations influence the way that QPainter renders graphics primitives

richtext/orderform

Order Form example shows how to generate rich text documents by combining a simple template with data input by the user in a dialog

richtext/syntaxhighlighter

Syntax Highlighter example shows how to perform simple syntax highlighting

tools/completer

Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model

tools/customcompleter

Custom Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model. The completer pops up suggestions for possible words based on the first three characters input by the user and the user's choice of word is inserted into the TextEdit using QTextCursor

tools/echoplugin

This example shows how to create a Qt plugin

tools/regularexpression

QRegularExpression example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings

tools/settingseditor

Settings Editor example shows how Qt's standard settings support is used in an application by providing an editor that enables the user to view the settings for installed applications, and modify those that can be edited

tools/styleplugin

This example shows how to create a plugin that extends Qt with a new GUI look and feel

tools/treemodelcompleter

Tree Model Completer example shows how to provide completion facilities for a hierarchical model, using a period as the separator to access Child, GrandChild and GrandGrandChild level objects

tools/undoframework

This example shows how to implement undo/redo functionality with the Qt undo framework

touch/knobs

Shows how to create custom controls that accept touch input

tutorials/notepad

A tutorial for Qt Widgets based notepad application

tutorials/widgets/childwidget

tutorials/widgets/nestedlayouts

tutorials/widgets/toplevel

tutorials/widgets/windowlayout

widgets/analogclock

Analog Clock example shows how to draw the contents of a custom widget

widgets/calculator

Example shows how to use signals and slots to implement the functionality of a calculator widget, and how to use QGridLayout to place child widgets in a grid

widgets/calendarwidget

Calendar Widget example shows use of QCalendarWidget

widgets/groupbox

Group Box example shows how to use the different kinds of group boxes in Qt

widgets/lineedits

Line Edits example demonstrates the many ways that QLineEdit can be used, and shows the effects of various properties and validators on the input and output supplied by the user

widgets/scribble

Scribble example shows how to reimplement some of QWidget's event handlers to receive the events generated for the application's widgets

widgets/shapedclock

Example shows how to make a round window with a translucent background

widgets/shortcuteditor

Shortcut Editor example shows how to create a basic, read-write hierarchical model to use with Qt's standard view and QKeySequenceEdit classes. For a description of Model/View Programming, see the Model/View Programming overview

widgets/sliders

Sliders example shows how to use the different types of sliders available in Qt: QSlider, QScrollBar and QDial

widgets/spinboxes

Spin Boxes example shows how to use the many different types of spin boxes available in Qt, from a simple QSpinBox widget to more complex editors like the QDateTimeEdit widget

widgets/tablet

This example shows how to use a Wacom tablet in Qt applications

widgets/tooltips

Tool Tips example shows how to provide static and dynamic tool tips for an application's widgets

widgets/windowflags

Window Flags example shows how to use the window flags available in Qt

Qt XML

dombookmarks

Provides a reader for XML Bookmark Exchange Language files