pyside6-getting-started

Qt PySide6 getting started with simple examples.

MIT License

Stars
41

Qt PySide6 Getting Started

This repository contains simple getting started examples to develop Qt applications in Python using PySide6. It is intended for educational purposes and self study:

  • Basic Python knowledge recommended.
  • No experiences with Qt or PySide required.
  • A computer to run / test the examples.

PySide6 Introduction

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.

PySide6 Examples

PySide6 Deployment

A separate PySide6 deployment project for Windows / Linux using Nuitka on Github Actions is available here.

PySide6 Documentation

Setup and Usage

Debug with PyCharm

Versions and Platforms

Examples are tested with PySide 6.7.2 on Ubuntu 22.10 Wayland and Windows 10/11. As Qt is platform independent, it may work on other systems like Raspberry Pi. See section Known issues for platform specific issues.

Known Bugs and Issues

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() and
      setGeometry() 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.
  • 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.
  • QTCREATORBUG-25807:
    PySide6 generated class doesn't load UI file correctly with QtCreator.
  • Example 13_qt_creator\01_qt_creator_qwidget.py generates 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.
Related Projects