This repository contains simple, self‑contained examples demonstrating how to develop Qt
applications in Python using PySide6.
It is intended for educational purposes and self‑study:
- Basic Python knowledge recommended
- No experience with Qt or PySide6 required
- A computer to run and test the examples
PySide6 is the official Qt for Python module, which provides access to the complete Qt 6.0+
framework. It is available under both Open Source (LGPLv3/GPLv2) and commercial license. Using PyPi
(PIP) is the recommended installation source.
- 00 Qt Core
- 01 Getting Started
- 02 Messagebox
- 03 Layout Management
- 04 Menu's and Toolbars
- 05 Events and Signals
- 06 Dialogs
- 07 Widgets
- 08 Widgets Specifics
- 09 Wizard
- 10 Drag and Drop
- 11 Drawing
- 12 Custom Widgets
- 13 Qt Creator
- 14 System tray
- 15 Miscellaneous
- 16 Games
- 17 Desktop Applications
- 18 Deployment
- 19 Tables
These examples are intended for:
- Developers new to PySide6 (or Qt)
- Students learning GUI programming in Python3
- Anyone looking for small, focused, and reproducible PySide6 examples
This repository provides a minimal, self‑contained Python 3 / PySide6 example application intended for learning, experimentation, and as a clean starting point for new PySide6 projects.
The project intentionally keeps its scope narrow:
- No external runtime dependencies
- No networking, API calls, or remote communication
- No dynamic or untrusted code execution
- No storage or processing of sensitive data
- No packaging, deployment, or executable‑building logic
(e.g., PyInstaller, Nuitka, cx_Freeze, or similar tools are out of scope) - No long‑term maintenance guarantees — best‑effort updates only
This ensures the codebase remains simple, transparent, and easy to understand for developers exploring PySide6 fundamentals.
A separate PySide6 deployment project for Windows / Linux using Nuitka on Github Actions is available here.
- Linux setup
- Windows setup
- MAC setup: Not supported by developer Erriez.
- Debug with free VSCode (On Windows and Linux desktops)
- Debug with free PyCharm (On Windows and Linux desktops)
Examples are tested with PySide6 6.7.2 on Ubuntu 22.10 Wayland (x64 and Raspberry Pi OS) and Windows 10/11. As Qt is platform‑independent, the examples may work on other platforms, but they are not supported by this project.
Please refer to section Known issues for platform specific known issues.
Contributions are welcome, but please keep the project scope in mind. Adding new features, external dependencies, other platform support or deployment tooling will not be accepted.
The following Qt / PySide6 / Qt Creator bugs are reported and affects examples in this
repository:
- QTBUG-110119: Cannot move
window on Ubuntu Wayland.
- Moving the top window on (Ubuntu) Wayland with widget functions
move()andsetGeometry()are not supported by Qt / PySide6. - Window move works on X11 and Windows 10.
- Other desktop GUI's such as TKinter are able to move the top window on Wayland.
- QTBUG-86780: Documentation update requested.
- Moving the top window on (Ubuntu) Wayland with widget functions
- QTBUG-110290: QWidget
showNormal()not working when window is minimized on Ubuntu X11 and Wayland. - QTBUG-110448: Cannot remove window min/max buttons on Ubuntu Wayland.
- QTBUG-132337: Removing window min/max buttons on Windows 11 also removes close button
- QTCREATORBUG-25807: PySide6 generated class doesn't load UI file correctly with QtCreator.
- Example
13_qt_creator\01_qt_creator_qwidget.pygenerates a warning:Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.Unclear how to resolve this. - Be aware that a large number of official PySide6 examples are currently outdated or API documentation is incomplete or inconsistent.