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.

Qml (Essentials)#

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 (Essentials)#

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

Quickcontrols (Essentials)#

gallery

Qt Quick Controls 2 - Gallery

contactslist

Qt Quick Controls - Contact List

filesystemexplorer

Qt Quick Controls - Filesystem Explorer

Widgets (Essentials)#

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

simplerhiwidget

Simple RHI Widget 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.

Designer (Essentials)#

taskmenuextension

Task Menu Extension Example

Uitools (Essentials)#

uiloader

found in the uitools directory.

Corelib (Essentials)#

mimetypesbrowser

MIME Type Browser Example

settingseditor

Settings Editor Example

sharedmemory

found in the corelib/ipc directory.

threads

Mandelbrot Threads Example

Async (Essentials)#

eratosthenes

Async “Eratosthenes” Example

minimal

Async “Minimal” Example

Network (Essentials)#

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.

Sql (Essentials)#

books

SQL Books Example

Dbus (Essentials)#

listnames

found in the dbus directory.

pingpong

found in the dbus directory.

Xml (Essentials)#

dombookmarks

DOM Bookmarks Example

Gui (Essentials)#

analogclock

Analog Clock Window Example

rhiwindow

RHI Window Example

Opengl (Essentials)#

contextinfo

Context Info Example

hellogl2

Hello GL2 Example

textures

Texture Example

threadedqopenglwidget

Threaded QOpenGLWidget Example

Samplebinding (Essentials)#

samplebinding

Sample Bindings Example

Scriptableapplication (Essentials)#

scriptableapplication

Scriptable Application Example

Widgetbinding (Essentials)#

widgetbinding

WigglyWidget Example

Qt Demos (Add-ons)#

mediaplayer

Media Player Example

Demos (Add-ons)#

colorpaletteclient

RESTful API client

documentviewer

Document Viewer Example

Graphs (Add-ons)#

widgetgallery

Widget Gallery

hellographs

HelloGraphs Example

Datavisualization (Add-ons)#

graphgallery

Graph Gallery

qmlsurfacegallery

Surface Graph Gallery

bars3d

Bars 3D Example

surface

Surface Example

surface_model_numpy

Surface Example

surface_numpy

Surface Example

Charts (Add-ons)#

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

Multimedia (Add-ons)#

audiooutput

Audio Output Example

audiosource

Audio Source Example

camera

Camera Example

player

Player Example

screencapture

Screen Capture Example

Webenginequick (Add-ons)#

nanobrowser

Nano Browser Example

Webenginewidgets (Add-ons)#

markdowneditor

found in the webenginewidgets directory.

notifications

WebEngine Notifications Example

simplebrowser

Simple Browser

widgetsnanobrowser

Qt Widgets Nano Browser Example

Axcontainer (Add-ons)#

axviewer

Ax Viewer Example

Bluetooth (Add-ons)#

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

External (Add-ons)#

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

Location (Add-ons)#

mapviewer

Map Viewer Example

Networkauth (Add-ons)#

redditclient

Reddit Example

Pdf (Add-ons)#

quickpdfviewer

PDF Viewer Example

Pdfwidgets (Add-ons)#

pdfviewer

PDF Viewer Example

Quick3D (Add-ons)#

customgeometry

Custom Geometry Example

intro

Introduction Example Qt Quick 3D

proceduraltexture

Procedural Texture Example

Remoteobjects (Add-ons)#

modelview

found in the remoteobjects directory.

Spatialaudio (Add-ons)#

audiopanning

Spatial Audio Panning Example

Speech (Add-ons)#

hello_speak

Hello Speak

3D (Add-ons)#

simple3d

Simple Qt 3D Example

Serialbus (Add-ons)#

can

CAN Bus example

modbusclient

Modbus Client example

Serialport (Add-ons)#

terminal

Terminal Example

Statemachine (Add-ons)#

moveblocks

Move Blocks Example

ping_pong

found in the statemachine directory.

rogue

found in the statemachine directory.

trafficlight

Traffic Light Example

Webchannel (Add-ons)#

standalone

WebChannel Standalone Example

Coap (M2M)#

simplecoapclient

Simple CoAP Client Example

Mqtt (M2M)#

simpleclient

Simple MQTT Client Example

Opcua (M2M)#

opcuaviewer

Qt OPC UA Viewer Example