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#

sharedmemory

found in the corelib/ipc directory.

mimetypesbrowser

MIME Type Browser Example

settingseditor

Settings Editor Example

threads

Mandelbrot Threads Example

Datavisualization#

bars3d

Bars 3D Example

graphgallery

Graph Gallery

qmlsurfacegallery

Surface Graph Gallery

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#

widget3d

Matplotlib Widget 3D Example

widget_gaussian

Matplotlib Widget Gaussian Example

networkx

Networkx viewer Example

opencv

OpenCV Face Detection Example

pandas

Pandas Simple Example

scikit

Scikit Image Example

Graphs#

widgetgallery

Widget Gallery

Gui#

analogclock

Analog Clock Window Example

rhiwindow

RHI Window Example

Location#

mapviewer

Map Viewer 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

found in the opcua directory.

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#

editingmodel

QAbstractListModel in QML

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

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

extended

Extending QML - Extension Objects Example

methods

Extending QML - Methods Example

properties

Extending QML - Object and List Property Types 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

usingmodel

Using Model Example

Quick#

objectlistmodel

Object List Model Example

stringlistmodel

String List Model Example

painteditem

Scene Graph Painted Item Example

rendercontrol_opengl

QQuickRenderControl OpenGL Example

openglunderqml

OpenGL under QML Squircle

scenegraph_customgeometry

Scene Graph - Custom Geometry

window

Qt Quick Examples - Window and Screen

Quick3D#

customgeometry

Custom Geometry Example

intro

Introduction Example Qt Quick 3D

proceduraltexture

Procedural Texture Example

Quickcontrols#

contactslist

Qt Quick Controls - Contact List

filesystemexplorer

Qt Quick Controls - Filesystem Explorer

gallery

Qt Quick Controls 2 - Gallery

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#

animatedtiles

Animated Tiles Example

appchooser

Application Chooser Example

easing

Easing Example

states

States Example

screenshot

Screenshot Example

systray

found in the widgets/desktop directory.

classwizard

Classwizard Example

extension

found in the widgets/dialogs directory.

licensewizard

License Wizard Example

standarddialogs

found in the widgets/dialogs directory.

tabdialog

Tab Dialog Example

trivialwizard

found in the widgets/dialogs directory.

draggabletext

found in the widgets/draganddrop directory.

dropsite

Drop Site Example

blurpicker

Blur Picker Effect Example

lighting

found in the widgets/effects directory.

gettext

GNU gettext Example

anchorlayout

found in the widgets/graphicsview directory.

collidingmice

found in the widgets/graphicsview directory.

diagramscene

found in the widgets/graphicsview directory.

dragdroprobot

found in the widgets/graphicsview directory.

elasticnodes

found in the widgets/graphicsview directory.

imageviewer

found in the widgets directory.

address_book

Address Book Example

basicfiltermodel

found in the widgets/itemviews directory.

dirview

Dir View Example

editabletreemodel

Editable Tree Model Example

fetchmore

found in the widgets/itemviews directory.

jsonmodel

JSON Model Example

spinboxdelegate

SpinBox Delegate Example

stardelegate

Star Delegate Example

basiclayouts

Basic Layouts Example

borderlayout

Border Layout Example

dynamiclayouts

Dynamic Layouts Example

flowlayout

Flow Layout Example

linguist

Qt Linguist Example

application

found in the widgets/mainwindows directory.

dockwidgets

Dock Widget Example

mdi

found in the widgets/mainwindows directory.

basicdrawing

Basic Drawing Example

concentriccircles

Concentric Circles Examples

painter

Painter Example

plot

Plot Example

orderform

found in the widgets/richtext directory.

syntaxhighlighter

Syntax Highlighter Example

textedit

TextEdit Example

textobject

TextObject Example

thread_signals

found in the widgets directory.

regularexpression

QRegularExpression Example

addressbook

Address Book Example

cannon

Cannon Example

modelview

Model View Tutorial Examples

charactermap

Character Map Example

digitalclock

Digital Clock Example

tetrix

Tetrix

widgetsgallery

Widgets Gallery Example

Xml#

dombookmarks

DOM Bookmarks Example