Examples#

A collection of examples are provided with Qt for Python to help new users to understand different use cases of the module.

You can find all these examples inside the pyside-setup repository on the examples directory.

3D#

simple3d

Simple Qt 3D Example

Qt Demos#

mediaplayer

Media Player Example

Async#

eratosthenes

Async “Eratosthenes” Example

minimal

Async “Minimal” Example

Axcontainer#

axviewer

Ax Viewer Example

Bluetooth#

btscanner

Bluetooth Scanner Example

heartrate_game

Bluetooth Low Energy Heart Rate Game

heartrate_server

Bluetooth Low Energy Heart Rate Server

lowenergyscanner

Bluetooth Low Energy Scanner Example

Charts#

areachart

Area Chart Example

audio

Audio Example

barchart

Bar Chart Example

callout

Callout Example

chartthemes

Chart Themes Example

donutbreakdown

Donut Chart Breakdown Example

dynamicspline

Dynamic Spline Example

legend

Legend Example

lineandbar

Line and Bar Chart Example

linechart

Line Chart Example

logvalueaxis

Logarithmic Axis Example

memoryusage

Memory Usag Example

modeldata

Model Data Example

nesteddonuts

Nested Donuts Example

percentbarchart

Percent Bar Chart Example

piechart

Pie Chart Example

pointconfiguration

Selected Point Configuration Example

pointselectionandmarkers

Light Markers and Points Selection Example

qmlpolarchart

QML Polar Chart Example

temperaturerecords

Temperature Records Example

Corelib#

mimetypesbrowser

MIME Type Browser Example

settingseditor

Settings Editor Example

sharedmemory

found in the corelib/ipc directory.

threads

Mandelbrot Threads Example

Datavisualization#

graphgallery

Graph Gallery

qmlsurfacegallery

Surface Graph Gallery

bars3d

Bars 3D Example

surface

Surface Example

surface_model_numpy

Surface Example

surface_numpy

Surface Example

Dbus#

listnames

found in the dbus directory.

pingpong

found in the dbus directory.

Demos#

documentviewer

Document Viewer Example

Designer#

taskmenuextension

Task Menu Extension (Designer)

External#

networkx

Networkx viewer Example

opencv

OpenCV Face Detection Example

pandas

Pandas Simple Example

scikit

Scikit Image Example

widget3d

Matplotlib Widget 3D Example

widget_gaussian

Matplotlib Widget Gaussian Example

Graphs#

widgetgallery

Widget Gallery

Gui#

analogclock

Analog Clock Window Example

rhiwindow

RHI Window Example

Location#

mapviewer

Map Viewer Example

Mqtt#

simpleclient

Simple MQTT Client Example

Multimedia#

audiooutput

Audio Output Example

audiosource

Audio Source Example

camera

Camera Example

player

Player Example

screencapture

Screen Capture Example

Network#

blockingfortuneclient

found in the network directory.

downloader

Downloader Example

fortuneclient

found in the network directory.

fortuneserver

found in the network directory.

googlesuggest

Google Suggest Example

loopback

Loopback Example

threadedfortuneserver

found in the network directory.

Networkauth#

redditclient

Reddit Example

Opcua#

opcuaviewer

Qt OPC UA Viewer Example

Opengl#

contextinfo

Context Info Example

hellogl2

Hello GL2 Example

textures

Texture Example

threadedqopenglwidget

Threaded QOpenGLWidget Example

Pdf#

quickpdfviewer

PDF Viewer Example

Pdfwidgets#

pdfviewer

PDF Viewer Example

Qml#

adding

Extending QML - Adding Types Example

a1-Base-project

Extending QML (advanced) - BirthdayParty Base Project

a2-Inheritance-and-coercion

Extending QML (advanced) - Inheritance and Coercion

a3-Default-properties

Extending QML (advanced) - Default Properties

a4-Grouped-properties

Extending QML (advanced) - Grouped Properties

a5-Attached-properties

Extending QML (advanced) - Attached Properties

a6-Property-value-source

Extending QML (advanced) - Property Value Source

binding

Extending QML - Binding Example

c1-basics

Extending QML - Creating a New Type

c2-methods

Extending QML - Connecting to C++ Methods and Signals

c3-bindings

Extending QML - Adding Property Bindings

c4-customPropertyTypes

Extending QML - Using Custom Property Types

c5-listproperties

Extending QML - Using List Property Types

c6-plugins

Extending QML - Plugins Example

editingmodel

QAbstractListModel in QML

extended

Extending QML - Extension Objects Example

methods

Extending QML - Methods Example

properties

Extending QML - Object and List Property Types Example

pytoqml1

found in the qml/signals directory.

pytoqml2

found in the qml/signals directory.

qmltopy1

found in the qml/signals directory.

qmltopy2

found in the qml/signals directory.

qmltopy3

found in the qml/signals directory.

qmltopy4

found in the qml/signals directory.

textproperties

Text Properties Example

usingmodel

Using Model Example

Quick#

objectlistmodel

Object List Model Example

openglunderqml

OpenGL under QML Squircle

painteditem

Scene Graph Painted Item Example

rendercontrol_opengl

QQuickRenderControl OpenGL Example

scenegraph_customgeometry

Scene Graph - Custom Geometry

stringlistmodel

String List Model Example

window

Qt Quick Examples - Window and Screen

Quick3D#

customgeometry

Custom Geometry Example

intro

Introduction Example Qt Quick 3D

proceduraltexture

Procedural Texture Example

Quickcontrols#

gallery

Qt Quick Controls 2 - Gallery

contactslist

Qt Quick Controls - Contact List

filesystemexplorer

Qt Quick Controls - Filesystem Explorer

Remoteobjects#

modelview

found in the remoteobjects directory.

Samplebinding#

samplebinding

Sample Bindings Example

Scriptableapplication#

scriptableapplication

Scriptable Application Example

Serialbus#

can

CAN Bus example

modbusclient

Modbus Client example

Serialport#

terminal

Terminal Example

Spatialaudio#

audiopanning

Spatial Audio Panning Example

Speech#

hello_speak

Hello Speak

Sql#

books

SQL Books Example

Statemachine#

moveblocks

Move Blocks Example

ping_pong

found in the statemachine directory.

rogue

found in the statemachine directory.

trafficlight

Traffic Light Example

Uitools#

uiloader

found in the uitools directory.

Webchannel#

standalone

WebChannel Standalone Example

Webenginequick#

nanobrowser

Nano Browser Example

Webenginewidgets#

markdowneditor

found in the webenginewidgets directory.

notifications

WebEngine Notifications Example

simplebrowser

Simple Browser

widgetsnanobrowser

Qt Widgets Nano Browser Example

Widgetbinding#

widgetbinding

WigglyWidget

Widgets#

widgetsgallery

Widgets Gallery Example

address_book

Address Book Example

addressbook

Address Book Example

anchorlayout

found in the widgets/graphicsview directory.

animatedtiles

Animated Tiles Example

appchooser

Application Chooser Example

application

found in the widgets/mainwindows directory.

basicdrawing

Basic Drawing Example

basicfiltermodel

found in the widgets/itemviews directory.

basiclayouts

Basic Layouts Example

blurpicker

Blur Picker Effect Example

borderlayout

Border Layout Example

cannon

Cannon Example

charactermap

Character Map Example

classwizard

Classwizard Example

collidingmice

found in the widgets/graphicsview directory.

concentriccircles

Concentric Circles Examples

diagramscene

found in the widgets/graphicsview directory.

digitalclock

Digital Clock Example

dirview

Dir View Example

dockwidgets

Dock Widget Example

dragdroprobot

found in the widgets/graphicsview directory.

draggabletext

found in the widgets/draganddrop directory.

dropsite

Drop Site Example

dynamiclayouts

Dynamic Layouts Example

easing

Easing Example

editabletreemodel

Editable Tree Model Example

elasticnodes

found in the widgets/graphicsview directory.

extension

found in the widgets/dialogs directory.

fetchmore

found in the widgets/itemviews directory.

flowlayout

Flow Layout Example

gettext

GNU gettext Example

imageviewer

found in the widgets directory.

jsonmodel

JSON Model Example

licensewizard

License Wizard Example

lighting

found in the widgets/effects directory.

linguist

Qt Linguist Example

mdi

found in the widgets/mainwindows directory.

modelview

Model View Tutorial Examples

orderform

found in the widgets/richtext directory.

painter

Painter Example

plot

Plot Example

regularexpression

QRegularExpression Example

screenshot

Screenshot Example

spinboxdelegate

SpinBox Delegate Example

standarddialogs

found in the widgets/dialogs directory.

stardelegate

Star Delegate Example

states

States Example

syntaxhighlighter

Syntax Highlighter Example

systray

found in the widgets/desktop directory.

tabdialog

Tab Dialog Example

tetrix

Tetrix

textedit

TextEdit Example

textobject

TextObject Example

thread_signals

found in the widgets directory.

trivialwizard

found in the widgets/dialogs directory.

Xml#

dombookmarks

DOM Bookmarks Example