The complete PySide tutorial — Create GUI applications with Python

Easily create professional-quality desktop applications for Windows, Mac and Linux. Unlock the power of Qt from Python with PySide.

Create GUI Applications with PySide

PySide, also known as Qt for Python, is a Python library for creating GUI applications using the Qt toolkit. PySide is the official binding for Qt on Python and is now developed by The Qt Company itself.

There are two major versions available: PySide2 based on Qt5 and PySide6 based on Qt6. Both versions are almost completely compatible aside from imports, and lack of support for some advanced modules in Qt6.

In this tutorial we'll learn how to use PySide to create desktop applications with Python.

This course includes 28 tutorials.

Getting started with PySide

Like writing any code, building PySide applications is all about approaching it in the right way. In the first part of the course we cover the fundamentals necessary to get you building Python GUIs as quickly as possible. By the end of the first part you'll have a running QApplication which we can then customize.

Take your first steps building Python & Qt5 apps with PySide

Creating applications with Qt Designer

As your applications get larger or interfaces become more complicated, it can get a bit cumbersome to define all elements programmatically. The good news is that Qt comes with a graphical editor Qt Designer (or Qt Creator) which contains a drag-and-drop UI editor — Qt Designer. In this PySide tutorial we'll cover the basics of creating Python GUIs with Qt Designer.

Using the drag-drop designer to develop your PySide apps

Extended UI features

In this PySide tutorial we'll cover some advanced features of Qt that you can use to improve your Python GUIs.

Extending your PySide apps with complex GUI behaviour

Threads & Processes

As your applications become more complex you may finding yourself wanting to perform long-running tasks, such as interacting with remote APIs or performing complex calculations. By default any code you write exists in the same thread and process, meaning your long-running code can actually block Qt execution and cause your Python GUI app to "hang". In this PySide tutorial we'll cover how to avoid this happening and keep your applications running smoothly, no matter the workload.

Run concurrent tasks without impacting your PySide UI

Create GUI Applications with Python & Qt (PySide6 Edition)
The easy way to create desktop applications

Create GUI Applications is the complete guide to building GUI applications with Python. Starting from the very basics of creating a desktop window this book takes you on a tour of the key features of PySide6 you can use to build real-life applications.

Downloadable ebook (PDF, ePub) & Complete Source code

To support developers in [[ countryRegion ]] I give a [[ localizedDiscount[couponCode] ]]% discount on all books and courses.

[[ activeDiscount.description ]] I'm giving a [[ ]]% discount on all books and courses.

ModelViews and Databases

All but the simplest of apps will usually need to interact with some kind of external data store — whether that's a database, a remote API or simple configuration data. The Qt ModelView architecture simplifies the linking and updating your UI with data in custom formats or from external sources. In this PySide tutorial we'll discover how you can use Qt ModelViews to build high performance Python GUIs.

Connecting your PySide application to data sources

Graphics and Plotting

In addition to the simple bitmap graphics already covered, Qt provides API for vector graphics. Vector graphics can be used to build complex and interactive interfaces beyond the normal widget interface. They can also be used for plotting nice graphs with PyQtGraph. In this PySide tutorial we'll introduce vector graphics and have a look at plotting data with PyQtGraph.

Vector graphics and plotting using PyQtGraph in PySide

Custom Widgets

Widgets in Qt are built on bitmap graphics — drawing pixels on a rectangular canvas to construct the "widget". To be able to create your own custom widgets you first need to understand how the QPainter system works and what you can do with it. In this PySide tutorial we'll go from basic bitmap graphics to our own entirely custom widget.

Designing your own custom widgets in PySide

Packaging and distribution

There comes a point in any app's development where it needs to leave home — half the fun in writing software is being able to share it with other people. Packaging Python GUI apps can be a little tricky, but in this PySide tutorial we'll cover how to package up your apps to share, whether commercially or just for fun.

Sharing your PySide applications with other people

QtQuick & QML

Qt Quick is Qt's declarative UI design system, using the Qt Modeling Language (QML) to define custom user interfaces. Originally developed for use in mobile applications, it offers dynamic graphical elements and fluid transitions and effects allowing you to replicate the kinds of UIs you find on mobile devices. Qt Quick is supported on all desktop platforms too and is a great choice for building desktop widgets or other interactive tools. Qt Quick is also a great choice for developing UIs for hardware and microcontrollers.

Building modern PySide GUIs with QtQuick & QML