PySide2 has two APIs for building GUIs. We've already introduced the Qt Widgets API which is well-suited for building desktop applications. Qt also provides a declarative API in the form of Qt Quick/QML. Qt Quick is well suited for building modern touchscreen interfaces for microcontrollers or device interfaces.

What is QML?

QML (Qt Modeling Language) is a declarative language that allows you to describe user interfaces in terms of their visual components and how they interact. Combined with Qt Quick, it provides a powerful framework for creating fluid, animated UIs directly from Python using PySide2.

With PySide2 and QML, you can separate your UI design from your application logic — writing the interface in QML while handling business logic in Python. This makes it easier to build responsive, modern interfaces for embedded systems, touch devices, and desktop applications alike.

PySide2 QML Tutorials

Explore QML/QtQuick Applications with PySide2

QML/QtQuick Applications with PySide2

Animations and Transformations With QtQuick in PySide2

Build an animated analog clock widget using QML image transformations and spring animations

Accessing a TableView from a Second QML File with PySide2

How to connect a Python QAbstractTableModel to a TableView loaded from a separate QML file

Create Applications with QtQuick in PySide2

Build modern desktop applications with declarative QML and Python